diff --git a/test/Verify2/ClientTest.php b/test/Verify2/ClientTest.php index 71f286f1..2193dcff 100644 --- a/test/Verify2/ClientTest.php +++ b/test/Verify2/ClientTest.php @@ -423,11 +423,13 @@ public function testCanRequestSilentAuth(): void $this->assertEquals('POST', $request->getMethod()); return true; - }))->willReturn($this->getResponse('verify-request-success', 202)); + }))->willReturn($this->getResponse('verify-silent-auth-request-success', 202)); $result = $this->verify2Client->startVerification($silentAuthRequest); $this->assertIsArray($result); $this->assertArrayHasKey('request_id', $result); + $this->assertArrayHasKey('check_url', $result); + $this->assertEquals('https://api.nexmo.com/v2/verify/c11236f4-00bf-4b89-84ba-88b25df97315/silent-auth/redirect', $result['check_url']); } public function testCannotSendConcurrentVerifications(): void diff --git a/test/Verify2/Fixtures/Responses/verify-silent-auth-request-success.json b/test/Verify2/Fixtures/Responses/verify-silent-auth-request-success.json new file mode 100644 index 00000000..6c60e5c0 --- /dev/null +++ b/test/Verify2/Fixtures/Responses/verify-silent-auth-request-success.json @@ -0,0 +1,4 @@ +{ + "request_id": "c11236f4-00bf-4b89-84ba-88b25df97315", + "check_url": "https://api.nexmo.com/v2/verify/c11236f4-00bf-4b89-84ba-88b25df97315/silent-auth/redirect" +} \ No newline at end of file