From c6451b0ff68beb05cc9e108391ba3c94bcea9325 Mon Sep 17 00:00:00 2001 From: herpaderpaldent Date: Sat, 4 Jan 2025 22:46:39 +0100 Subject: [PATCH] Add unit test for FindCorporationRefreshToken service. --- .../FindCorporationRefreshTokenTest.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/Unit/Services/FindCorporationRefreshTokenTest.php diff --git a/tests/Unit/Services/FindCorporationRefreshTokenTest.php b/tests/Unit/Services/FindCorporationRefreshTokenTest.php new file mode 100644 index 00000000..3aa4cbf4 --- /dev/null +++ b/tests/Unit/Services/FindCorporationRefreshTokenTest.php @@ -0,0 +1,19 @@ +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(); +});