mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-28 08:54:03 +00:00
can insert both so and soitem into db, but have an error
This commit is contained in:
@@ -27,27 +27,28 @@ class ShippingorderTest extends TestCase
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function testPOSTso()
|
||||
{
|
||||
$response = $this->json('POST', '/api/so/{so_id}', [
|
||||
// public function testPOSTso()
|
||||
// {
|
||||
// $response = $this->json('POST', '/api/so/{so_id}', [
|
||||
|
||||
'id' => '1',
|
||||
'ff_id' => '1',
|
||||
'supplier_company_name' => 'Testing',
|
||||
'supplier_contact_person' => 'Testing',
|
||||
'supplier_contact_person_no' => '1234',
|
||||
'delivery_id' => '1',
|
||||
'warehouse_id' => '1',
|
||||
// 'id' => '1',
|
||||
// 'ff_id' => '1',
|
||||
// 'supplier_company_name' => 'Testing',
|
||||
// 'supplier_contact_person' => 'Testing',
|
||||
// 'supplier_contact_person_no' => '1234',
|
||||
// 'delivery_id' => '1',
|
||||
// 'warehouse_id' => '1',
|
||||
|
||||
]);
|
||||
// ]);
|
||||
|
||||
$response->assertStatus(201);
|
||||
}
|
||||
// $response->assertStatus(201);
|
||||
// }
|
||||
|
||||
public function testPOSTsoITEM()
|
||||
{
|
||||
$response = $this->json('POST', '/api/so/soitem/{so_id}', [
|
||||
|
||||
$response = $this->json('POST', '/api/so/soitem/{so_id}',
|
||||
|
||||
[
|
||||
'so_id' => '2',
|
||||
'status' => '1',
|
||||
'order_id' => '2',
|
||||
@@ -63,51 +64,9 @@ class ShippingorderTest extends TestCase
|
||||
'packaging_depth' => '123',
|
||||
'packaging_gross' => '123',
|
||||
'packaging_nett' => '123',
|
||||
|
||||
]);
|
||||
|
||||
$response->assertStatus(201);
|
||||
}
|
||||
|
||||
public function testDELETEso()
|
||||
{
|
||||
$response = $this->json('DELETE', '/api/so/8');
|
||||
|
||||
$response->assertStatus(204);
|
||||
}
|
||||
|
||||
public function testDELETEsoitem()
|
||||
{
|
||||
$response = $this->json('DELETE', '/api/so/soitem/3');
|
||||
|
||||
$response->assertStatus(204);
|
||||
}
|
||||
|
||||
public function testPUTso()
|
||||
{
|
||||
|
||||
|
||||
$response = $this->json('PUT', '/api/so/2', [
|
||||
|
||||
'id' => '1',
|
||||
'ff_id' => '1',
|
||||
'supplier_company_name' => 'Testinggggggggggggggggggggg',
|
||||
'supplier_contact_person' => 'Testing',
|
||||
'supplier_contact_person_no' => '1234',
|
||||
'delivery_id' => '1',
|
||||
'warehouse_id' => '1',
|
||||
|
||||
]);
|
||||
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
public function testPUTsoitem()
|
||||
{
|
||||
|
||||
|
||||
$response = $this->json('PUT', '/api/so/soitem/1', [
|
||||
|
||||
],
|
||||
|
||||
[
|
||||
'so_id' => '2',
|
||||
'status' => '1',
|
||||
'order_id' => '2',
|
||||
@@ -117,16 +76,75 @@ class ShippingorderTest extends TestCase
|
||||
'quantity_of_item' => '2',
|
||||
'uom' => 'test',
|
||||
'quantity_of_carton' => '2',
|
||||
'packaging_type' => 'Testinggggggggggggggggggg',
|
||||
'packaging_type' => 'Testing',
|
||||
'packaging_height' => '123',
|
||||
'packaging_width' => '123',
|
||||
'packaging_depth' => '123',
|
||||
'packaging_gross' => '123',
|
||||
'packaging_nett' => '123',
|
||||
|
||||
]);
|
||||
|
||||
$response->assertStatus(200);
|
||||
|
||||
$response->assertStatus(201);
|
||||
}
|
||||
|
||||
// public function testDELETEso()
|
||||
// {
|
||||
// $response = $this->json('DELETE', '/api/so/8');
|
||||
|
||||
// $response->assertStatus(204);
|
||||
// }
|
||||
|
||||
// public function testDELETEsoitem()
|
||||
// {
|
||||
// $response = $this->json('DELETE', '/api/so/soitem/3');
|
||||
|
||||
// $response->assertStatus(204);
|
||||
// }
|
||||
|
||||
// public function testPUTso()
|
||||
// {
|
||||
|
||||
|
||||
// $response = $this->json('PUT', '/api/so/2', [
|
||||
|
||||
// 'id' => '1',
|
||||
// 'ff_id' => '1',
|
||||
// 'supplier_company_name' => 'Testinggggggggggggggggggggg',
|
||||
// 'supplier_contact_person' => 'Testing',
|
||||
// 'supplier_contact_person_no' => '1234',
|
||||
// 'delivery_id' => '1',
|
||||
// 'warehouse_id' => '1',
|
||||
|
||||
// ]);
|
||||
|
||||
// $response->assertStatus(200);
|
||||
// }
|
||||
|
||||
// public function testPUTsoitem()
|
||||
// {
|
||||
|
||||
|
||||
// $response = $this->json('PUT', '/api/so/soitem/1', [
|
||||
|
||||
// 'so_id' => '2',
|
||||
// 'status' => '1',
|
||||
// 'order_id' => '2',
|
||||
// 'brand_no' => '2',
|
||||
// 'model_no' => '2',
|
||||
// 'item_code' => '2',
|
||||
// 'quantity_of_item' => '2',
|
||||
// 'uom' => 'test',
|
||||
// 'quantity_of_carton' => '2',
|
||||
// 'packaging_type' => 'Testinggggggggggggggggggg',
|
||||
// 'packaging_height' => '123',
|
||||
// 'packaging_width' => '123',
|
||||
// 'packaging_depth' => '123',
|
||||
// 'packaging_gross' => '123',
|
||||
// 'packaging_nett' => '123',
|
||||
|
||||
// ]);
|
||||
|
||||
// $response->assertStatus(200);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user