Skip to content

Commit

Permalink
Merge pull request #83 from RonasIT/82-moved-status-api-out-of-versio…
Browse files Browse the repository at this point in the history
…ning-routes

#82: Moved status api out of versioning routes
  • Loading branch information
DenTray authored Jun 5, 2024
2 parents bddff48 + e86fd4a commit 9ad43b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
Route::post('auth/forgot-password', [AuthController::class, 'forgotPassword']);
Route::post('auth/restore-password', [AuthController::class, 'restorePassword']);
Route::post('auth/token/check', [AuthController::class, 'checkRestoreToken']);

Route::get('status', [StatusController::class, 'status']);
});
});
});

Route::group(['middleware' => 'guest_group'], function () {
Route::get('status', [StatusController::class, 'status']);
});
4 changes: 2 additions & 2 deletions tests/StatusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class StatusTest extends TestCase
{
public function testStatusOk()
{
$response = $this->json('get', '/status');
$response = $this->get('/status');

$response->assertOk();
}
Expand All @@ -23,7 +23,7 @@ public function testStatusServiceUnavailable()
DB::shouldReceive('connection')->andReturn($connection);
DB::shouldReceive('getPdo')->andThrow(Exception::class);

$response = $this->json('get', '/status');
$response = $this->get('/status');

$response->assertStatus(Response::HTTP_SERVICE_UNAVAILABLE);
}
Expand Down

0 comments on commit 9ad43b2

Please sign in to comment.