Skip to content

Commit

Permalink
Add unit test for FindCorporationRefreshToken service.
Browse files Browse the repository at this point in the history
  • Loading branch information
herpaderpaldent committed Jan 4, 2025
1 parent e2b3837 commit c6451b0
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/Unit/Services/FindCorporationRefreshTokenTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

it('returns no RefreshToken if character has no role', function () {

// Arrange
$corporation_id = testCharacter()->corporation_id;
$scope = 'esi-corporations.read_corporation_membership.v1';
$role = 'Director';

updateRefreshTokenScopes(testCharacter()->refresh_token, [$scope])->save();

// Act
$find_corporation_refresh_token = new \Seatplus\Eveapi\Services\FindCorporationRefreshToken();

$refresh_token = $find_corporation_refresh_token($corporation_id, $scope, $role);

// Assert
expect($refresh_token)->toBeNull();
});

0 comments on commit c6451b0

Please sign in to comment.