Fix failing test, cause oauth device flow is encoded using realm attributes.

This commit is contained in:
Łukasz Dywicki 2020-04-22 14:42:57 +02:00 committed by Pedro Igor
parent 5edf14944e
commit 319195236b

View file

@ -179,7 +179,9 @@ public class RealmTest extends AbstractAdminTest {
try {
RealmRepresentation rep2 = adminClient.realm("attributes").toRepresentation();
assertTrue("Attributes was expected to be empty, but was: " + String.join(", ", rep2.getAttributes().keySet()), rep2.getAttributes().isEmpty());
Map<String, String> attributes = rep2.getAttributes();
assertTrue("Attributes expected to be present oauth2DeviceCodeLifespan, oauth2DevicePollingInterval, found: " + String.join(", ", attributes.keySet()),
attributes.size() == 2 && attributes.containsKey("oauth2DeviceCodeLifespan") && attributes.containsKey("oauth2DevicePollingInterval"));
} finally {
adminClient.realm("attributes").remove();
}