unch-cms/tests/Feature/ApiTest.php
2022-09-02 11:25:50 +07:00

27 lines
536 B
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
class ApiTest extends TestCase
{
/**
* A basic feature test example.
*
* @return void
*/
public function test_asserting_an_exact_json_match()
{
$response = $this->postJson('/user', ['name' => 'Sally']);
$response
->assertStatus(201)
->assertExactJson([
'created' => true,
]);
}
}