27 lines
536 B
PHP
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,
|
|
]);
|
|
}
|
|
}
|