From b4c44f5a1474e7ef5c7982fd78d9afa4f19b3893 Mon Sep 17 00:00:00 2001 From: NoAvatar Date: Fri, 18 Oct 2024 02:15:01 +1000 Subject: [PATCH] Add RefreshDatabase for UserTest --- tests/Feature/UserTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Feature/UserTest.php b/tests/Feature/UserTest.php index ba49a01..abffa12 100644 --- a/tests/Feature/UserTest.php +++ b/tests/Feature/UserTest.php @@ -3,12 +3,14 @@ namespace Tests\Feature; use App\Models\User; +use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class UserTest extends TestCase { // FIXME: tests should be // grouped and be separated in several files + use RefreshDatabase; public function test_success_get_users(): void { @@ -34,6 +36,6 @@ public function test_fail_get_user_not_exists(): void // but in future updates id // will be uuid, it is safer $this->get('/user/sehtrgher') - ->assertNotFound(); + ->assertBadRequest(); } }