From 2ec143a3babd27038d7dee1c9cb4147900858b0f Mon Sep 17 00:00:00 2001 From: Stian Thorgersen Date: Tue, 13 Oct 2015 13:17:46 +0200 Subject: [PATCH] Fix tests --- .../java/org/keycloak/testsuite/forms/CustomFlowTest.java | 4 ++-- .../keycloak/testsuite/oauth/ClientAuthSignedJWTTest.java | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/CustomFlowTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/CustomFlowTest.java index 33cc03753c..418a3d6997 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/CustomFlowTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/forms/CustomFlowTest.java @@ -205,7 +205,7 @@ public class CustomFlowTest { PassThroughClientAuthenticator.clientId = "unknown"; OAuthClient.AccessTokenResponse response = oauth.doGrantAccessTokenRequest("password", "test-user", "password"); assertEquals(400, response.getStatusCode()); - assertEquals("invalid_client", response.getError()); + assertEquals("unauthorized_client", response.getError()); events.expectLogin() .client((String) null) @@ -214,7 +214,7 @@ public class CustomFlowTest { .removeDetail(Details.CODE_ID) .removeDetail(Details.REDIRECT_URI) .removeDetail(Details.CONSENT) - .error(Errors.CLIENT_NOT_FOUND) + .error(Errors.INVALID_CLIENT_CREDENTIALS) .assertEvent(); } diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/ClientAuthSignedJWTTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/ClientAuthSignedJWTTest.java index 2aa13b26d9..2ce5f01053 100644 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/ClientAuthSignedJWTTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/oauth/ClientAuthSignedJWTTest.java @@ -212,7 +212,7 @@ public class ClientAuthSignedJWTTest { HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); 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 @@ -224,7 +224,7 @@ public class ClientAuthSignedJWTTest { HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); 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 @@ -236,7 +236,7 @@ public class ClientAuthSignedJWTTest { HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); 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 @@ -268,7 +268,7 @@ public class ClientAuthSignedJWTTest { HttpResponse resp = sendRequest(oauth.getServiceAccountUrl(), parameters); 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