unch-cms/tests/Feature/ApiTest.php

27 lines
536 B
PHP
Raw Normal View History

2022-09-02 11:25:50 +07:00
<?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,
]);
}
}