Files
izyim-api/tests/Unit/contactTest.php
T
Zain Fauzan Rofie Azizi 70cc220337 rename test
2018-06-29 11:04:37 +08:00

53 lines
985 B
PHP

<?php
namespace Tests\Unit\contactTest;
namespace Tests\API;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
class ContactTest extends TestCase
{
public function testGet()
{
$response = $this->json('GET', '/api/company/search/cief');
$response
->assertStatus(200);
}
public function testStoreId()
{
$response = $this->json('POST', '/api/contacts', ['company_id' => '1'], $this->headers());
$response
->assertStatus(201);
}
// public function testDeleteContacts()
// {
//
// $response = $this->json('DELETE', '/api/contacts/1');
//
// $response
// ->assertStatus(204);
//
// }
public function testApprove()
{
$response = $this->json('POST', '/api/contacts/1/request', ['action' => 1]);
$response
->assertStatus(200);
}
}