Merge pull request #3378 from stianst/KEYCLOAK-3756

KEYCLOAK-3756
This commit is contained in:
Stian Thorgersen 2016-10-19 19:55:57 +02:00 committed by GitHub
commit 84bf546911

View file

@ -57,6 +57,7 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
try { try {
reg.create(rep); reg.create(rep);
Assert.fail("Expected exception");
} catch (ClientRegistrationException e) { } catch (ClientRegistrationException e) {
Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode()); Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
} }
@ -78,6 +79,7 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
try { try {
reg.create(rep); reg.create(rep);
Assert.fail("Expected exception");
} catch (ClientRegistrationException e) { } catch (ClientRegistrationException e) {
Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode()); Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
} }
@ -95,6 +97,7 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
try { try {
reg.create(rep); reg.create(rep);
Assert.fail("Expected exception");
} catch (ClientRegistrationException e) { } catch (ClientRegistrationException e) {
Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode()); Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
} }
@ -112,6 +115,7 @@ public class InitialAccessTokenTest extends AbstractClientRegistrationTest {
try { try {
reg.create(rep); reg.create(rep);
Assert.fail("Expected exception");
} catch (ClientRegistrationException e) { } catch (ClientRegistrationException e) {
Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode()); Assert.assertEquals(401, ((HttpErrorException) e.getCause()).getStatusLine().getStatusCode());
} }