Skip to content

Commit

Permalink
Test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
keithbrink committed Jul 17, 2024
1 parent cfc0448 commit 8347e42
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/Unit/Data/TokensTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,21 @@ public function testSetupTokensWithExistingDate()
$this->assertEquals($refresh_token, $dto->refresh_token);
$this->assertEquals($expires_at, $dto->expires_at);
}

public function testSetupTokensWithNoExpiry()
{
$access_token = Str::random();
$refresh_token = Str::random();
$expires_at = null;

$dto = new AuthTokens(
access_token: $access_token,
refresh_token: $refresh_token,
expires_at: $expires_at,
);

$this->assertEquals($access_token, $dto->access_token);
$this->assertEquals($refresh_token, $dto->refresh_token);
$this->assertEquals($expires_at, $dto->expires_at);
}
}

0 comments on commit 8347e42

Please sign in to comment.