From 37552ab84d515eb006dd975aafae3d6b7b540b65 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Fri, 28 Jul 2023 15:50:23 +0300 Subject: [PATCH] update test --- tests/Feature/ApiAuthenticationTest.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/Feature/ApiAuthenticationTest.php b/tests/Feature/ApiAuthenticationTest.php index 8ca031d..b751305 100644 --- a/tests/Feature/ApiAuthenticationTest.php +++ b/tests/Feature/ApiAuthenticationTest.php @@ -16,14 +16,9 @@ public function setUp(): void { parent::setUp(); - - // create 10 users - User::factory()->count(10)->create(); - - $user = User::first(); + $user = User::factory()->create(); $this->apiKey = $user->api_key; $this->secretKey = $user->secret_key; - } public function test_auth(): void @@ -56,6 +51,8 @@ public function test_users_rate_limit(): void public function test_api_response_data(): void { + User::factory()->count(9)->create(); + $response = $this->postJson('/api/app/users', data: [], headers: ['api_key' => $this->apiKey, 'secret_key' => $this->secretKey]); $response