mirror of
https://github.com/ysoftdevs/oauth-playground-server.git
synced 2026-01-18 09:38:09 +01:00
DAG authorization pending - failing test
This commit is contained in:
@@ -45,14 +45,6 @@ public class DeviceAuthGrantTest {
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void deviceAuthGrant_invalidCode() throws IOException {
|
||||
DeviceCodeScreen deviceCodeScreen = new DeviceCodeScreen(deviceLoginUri);
|
||||
|
||||
HttpStatusException exception = assertThrows(HttpStatusException.class, () -> deviceCodeScreen.enterCode("somecode"));
|
||||
assertThat(exception.getStatusCode(), is(404));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deviceAuthGrant() throws IOException {
|
||||
DeviceAuthorizationGrantFlow flow = new DeviceAuthorizationGrantFlow(deviceUri, CLIENT);
|
||||
@@ -66,4 +58,19 @@ public class DeviceAuthGrantTest {
|
||||
|
||||
flow.exchangeDeviceCode();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deviceAuthGrant_invalidUserCode() throws IOException {
|
||||
DeviceCodeScreen deviceCodeScreen = new DeviceCodeScreen(deviceLoginUri);
|
||||
|
||||
HttpStatusException exception = assertThrows(HttpStatusException.class, () -> deviceCodeScreen.enterCode("somecode"));
|
||||
assertThat(exception.getStatusCode(), is(404));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void deviceAuthGrant_authorizationPending() throws IOException {
|
||||
DeviceAuthorizationGrantFlow flow = new DeviceAuthorizationGrantFlow(deviceUri, CLIENT);
|
||||
flow.start();
|
||||
flow.exchangeDeviceCode();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user