Files
izyim-api/tests/Unit/CompanyTest.php
T
2018-05-15 11:17:14 +08:00

57 lines
1.4 KiB
PHP

<?php
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class CompanyTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testExample()
{
$this->assertTrue(true);
}
public function testPOST()
{
$response = $this->json('POST', '/api/company', [
'company_name'=>'testing',
'registration_no'=>'testing',
'tax_no'=>'testing',
'tel_no'=>'testing',
'fax'=>'testing',
'address'=>'testing',
'city'=>'testing',
'postcode'=>'testing',
'state'=>'testing',
'country'=>'testing',
'contact_person'=>'testing',
]);
$response->assertStatus(201);
}
public function testPUT()
{
$response = $this->json('PUT', '/api/company/1', [
'company_name'=>'testing',
'registration_no'=>'testing',
'tax_no'=>'testing',
'tel_no'=>'testing',
'fax'=>'testing',
'address'=>'testing',
'city'=>'testing',
'postcode'=>'testing',
'state'=>'testing',
'country'=>'testing',
'contact_person'=>'testing',
]);
$response->assertStatus(200);
}
}