Fix tests

This commit is contained in:
Stian Thorgersen 2015-10-13 13:17:46 +02:00
parent a279ff3d7f
commit 2ec143a3ba
2 changed files with 6 additions and 6 deletions

View file

@ -205,7 +205,7 @@ public class CustomFlowTest {
PassThroughClientAuthenticator.clientId = "unknown"; PassThroughClientAuthenticator.clientId = "unknown";
OAuthClient.AccessTokenResponse response = oauth.doGrantAccessTokenRequest("password", "test-user", "password"); OAuthClient.AccessTokenResponse response = oauth.doGrantAccessTokenRequest("password", "test-user", "password");
assertEquals(400, response.getStatusCode()); assertEquals(400, response.getStatusCode());
assertEquals("invalid_client", response.getError()); assertEquals("unauthorized_client", response.getError());
events.expectLogin() events.expectLogin()
.client((String) null) .client((String) null)
@ -214,7 +214,7 @@ public class CustomFlowTest {
.removeDetail(Details.CODE_ID) .removeDetail(Details.CODE_ID)
.removeDetail(Details.REDIRECT_URI) .removeDetail(Details.REDIRECT_URI)
.removeDetail(Details.CONSENT) .removeDetail(Details.CONSENT)
.error(Errors.CLIENT_NOT_FOUND) .error(Errors.INVALID_CLIENT_CREDENTIALS)
.assertEvent(); .assertEvent();
} }

View file

@ -212,7 +212,7 @@ public class ClientAuthSignedJWTTest {
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp); OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
assertError(response, null, "invalid_client", Errors.INVALID_CLIENT); assertError(response, null, "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
} }
@Test @Test
@ -224,7 +224,7 @@ public class ClientAuthSignedJWTTest {
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp); OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
assertError(response, null, "invalid_client", Errors.INVALID_CLIENT); assertError(response, null, "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
} }
@Test @Test
@ -236,7 +236,7 @@ public class ClientAuthSignedJWTTest {
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp); OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
assertError(response, null, "invalid_client", Errors.INVALID_CLIENT_CREDENTIALS); assertError(response, null, "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
} }
@Test @Test
@ -268,7 +268,7 @@ public class ClientAuthSignedJWTTest {
HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters);
OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp); OAuthClient.AccessTokenResponse response = new OAuthClient.AccessTokenResponse(resp);
assertError(response, "unknown-client", "invalid_client", Errors.CLIENT_NOT_FOUND); assertError(response, "unknown-client", "unauthorized_client", Errors.INVALID_CLIENT_CREDENTIALS);
} }
@Test @Test