mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
53 lines
985 B
PHP
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);
|
|
|
|
}
|
|
|
|
}
|