Update refresh token test for deleted user

Instead of disabling the user under test, the test will now correctly
delete the user under test.
This commit is contained in:
Martin Hardselius 2017-07-10 10:20:41 +02:00
parent 8cb8678525
commit 5b2e390f57

View file

@ -538,7 +538,7 @@ public class RefreshTokenTest extends AbstractKeycloakTest {
events.expectCodeToToken(codeId, sessionId).user(userId).assertEvent();
UserManager.realm(adminClient.realm("test")).username("temp-user@localhost").enabled(false);
adminClient.realm("test").users().delete(userId);
response = oauth.doRefreshTokenRequest(refreshTokenString, "password");
assertEquals(400, response.getStatusCode());
assertEquals("invalid_grant", response.getError());