mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 12:34:06 +00:00
73 lines
1.7 KiB
PHP
73 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace Tests\Unit\Deliveryinfo;
|
|
namespace Test\API;
|
|
|
|
use Tests\TestCase;
|
|
use Illuminate\Foundation\Testing\WithFaker;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
class DeliveryinfoTest extends TestCase
|
|
{
|
|
/**
|
|
* A basic test example.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function testGET()
|
|
{
|
|
$response = $this->json('GET', '/api/company/deliveryinfo');
|
|
|
|
$response->assertStatus(200);
|
|
}
|
|
|
|
public function testPOST()
|
|
{
|
|
$response = $this->json('POST', '/api/company/com_id/deliveryinfo', [
|
|
|
|
'branch' => 'Testing',
|
|
'deli_info' => 'Testing',
|
|
'address' => 'Testing',
|
|
'city' => 'Testing',
|
|
'postcode' => '12345',
|
|
'state' => 'Testing',
|
|
'country' => 'Testing',
|
|
'contact_person' => 'Testing',
|
|
'contact_person_no' => '12345',
|
|
|
|
]);
|
|
|
|
$response->assertStatus(201);
|
|
}
|
|
|
|
public function testDELETE()
|
|
{
|
|
$response = $this->json('DELETE', '/api/company/4/deliveryinfo');
|
|
|
|
$response->assertStatus(204);
|
|
}
|
|
|
|
public function testPUT()
|
|
{
|
|
|
|
|
|
$response = $this->json('PUT', '/api/company/1/deliveryinfo', [
|
|
|
|
//'id' => '1',
|
|
'branch' => 'Ci',
|
|
'deli_info' => 'Testing',
|
|
'address' => 'Testing',
|
|
'city' => 'Test',
|
|
'postcode' => '12345',
|
|
'state' => 'Testing',
|
|
'country' => 'Testing',
|
|
'contact_person' => 'Testing',
|
|
'contact_person_no' => '12345'
|
|
|
|
]);
|
|
|
|
$response->assertStatus(200);
|
|
}
|
|
}
|