Total Complexity | 2 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | class OrganizationClaimsTest extends TestCase |
||
12 | { |
||
13 | /** |
||
14 | * @test |
||
15 | */ |
||
16 | public function it_resolves_no_claims() |
||
17 | { |
||
18 | $user = new User('[email protected]', 'qwerty'); |
||
19 | |||
20 | $this->assertEmpty((new OrganizationClaims())->resolve($user)); |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * @test |
||
25 | */ |
||
26 | public function it_resolves_claims() |
||
27 | { |
||
28 | $user = new User('[email protected]', 'qwerty'); |
||
29 | |||
30 | $claims = (new OrganizationClaims('github', 'app'))->resolve($user); |
||
31 | |||
32 | $this->assertEquals(['iss' => 'github', 'aud' => 'app'], $claims); |
||
33 | } |
||
35 |