mirror of
https://github.com/ysoftdevs/oauth-playground-server.git
synced 2026-01-17 17:22:06 +01:00
refactor tests - bad creds
This commit is contained in:
@@ -59,6 +59,17 @@ public class AuthCodeGrantTest {
|
||||
assertThat(accessTokenResponse.accessToken(), is(notNullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void badCredentials() throws IOException {
|
||||
AuthorizationCodeFlow flow = new AuthorizationCodeFlow(authUrl, CLIENT)
|
||||
.scope("scope1 scope2");
|
||||
LoginScreen loginScreen = flow.start().expectLogin();
|
||||
|
||||
loginScreen.submit("x", "bbb").expectError("Invalid credentials")
|
||||
.submit("bob", "bbb").expectError("Invalid credentials")
|
||||
.submit("bob", "password").expectSuccess();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void authCodeGrant_invalidResponseType() throws IOException {
|
||||
AuthorizationCodeFlow flow = new AuthorizationCodeFlow(authUrl, CLIENT)
|
||||
|
||||
Reference in New Issue
Block a user