From 6d11964f331d8befd89a8a11e84c7979eb36d1e6 Mon Sep 17 00:00:00 2001 From: David Adi Nugroho Date: Mon, 11 Dec 2023 16:03:01 +0700 Subject: [PATCH] fix test --- tests/Features/ApiResponseTest.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/Features/ApiResponseTest.php b/tests/Features/ApiResponseTest.php index a6c0630..1924e9d 100644 --- a/tests/Features/ApiResponseTest.php +++ b/tests/Features/ApiResponseTest.php @@ -24,14 +24,14 @@ Route::get('api-forbidden', fn () => ApiResponse::forbidden()); Route::get('api-badRequest', fn () => ApiResponse::badRequest()); - getJson('api-create')->assertOk(); - getJson('api-success')->assertOk(); - getJson('api-error')->assertInternalServerError(); - getJson('api-notFound')->assertNotFound(); - getJson('api-unprocessable')->assertUnprocessable(); - getJson('api-unauthorized')->assertUnauthorized(); - getJson('api-forbidden')->assertForbidden(); - getJson('api-badRequest')->assertBadRequest(); + getJson('api-create')->assertStatus(Response::HTTP_OK); + getJson('api-success')->assertStatus(Response::HTTP_OK); + getJson('api-error')->assertStatus(Response::HTTP_INTERNAL_SERVER_ERROR); + getJson('api-notFound')->assertStatus(Response::HTTP_NOT_FOUND); + getJson('api-unprocessable')->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY); + getJson('api-unauthorized')->assertStatus(Response::HTTP_UNAUTHORIZED); + getJson('api-forbidden')->assertStatus(Response::HTTP_FORBIDDEN); + getJson('api-badRequest')->assertStatus(Response::HTTP_BAD_REQUEST); }); it('returns correct response header', function () {