Skip to content

Commit

Permalink
All auth tests now passing
Browse files Browse the repository at this point in the history
  • Loading branch information
aronnebrivio committed Mar 21, 2021
1 parent d8c47c4 commit 6863cd5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/AuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ public function testLogin()
->seeStatusCode(401);
}

/*
* FIXME: doesn't retrieve the token
public function testLogout()
{
$user = User::factory()->create();
// $this->actingAs($user);
$this->refreshApplication();

$user = User::factory()->create();
// NOTE: in order to make logout() function working we have to pass the JWT token -> can't use standard actingAs function
$token = JWTAuth::fromUser($user);

Expand All @@ -45,15 +43,16 @@ public function testLogout()

public function testRefresh()
{
$this->refreshApplication();

$user = User::factory()->create();
// NOTE: in order to make logout() function working we have to pass the JWT token -> can't use standard actingAs function
$token = JWTAuth::fromUser($user);

$this->post('auth/refresh', [], ['Authorization' => 'Bearer ' . $token])
$this->json('POST', 'auth/refresh', [], ['Authorization' => 'Bearer ' . $token])
->seeStatusCode(200)
->seeJson(['token_type' => 'bearer']);
}
*/

public function testMe()
{
Expand Down

0 comments on commit 6863cd5

Please sign in to comment.