Skip to content

Commit

Permalink
tests for unauthenticated added
Browse files Browse the repository at this point in the history
  • Loading branch information
rrd108 committed Oct 22, 2023
1 parent 6a839b7 commit 3495c93
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/TestCase/Controller/UsersControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ public function testLogin(): void

public function testIndex(): void
{
$this->get('/users.json');
$this->assertResponseCode(401);

$this->configRequest([
'headers' => ['Token' => 'FalseToken']
]);
$this->get('/users.json');
$this->assertResponseCode(401);


$this->configRequest([
'headers' => ['Token' => 'token-1']
]);
Expand Down

0 comments on commit 3495c93

Please sign in to comment.