diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/updaters/ClientAttributeUpdater.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/updaters/ClientAttributeUpdater.java index 3105afc5e8..09080540fe 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/updaters/ClientAttributeUpdater.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/updaters/ClientAttributeUpdater.java @@ -136,4 +136,9 @@ public class ClientAttributeUpdater extends ServerResourceUpdater roleMappings = (Map) idToken.getOtherClaims().get("roles-custom"); + assertNotNull(roleMappings); + assertThat(roleMappings.keySet(), containsInAnyOrder("realm", diffClient)); + String realmRoleMappings = (String) roleMappings.get("realm"); + String testAppScopeMappings = (String) roleMappings.get(diffClient); + assertRolesString(realmRoleMappings, + "pref.admin", + "pref.user", + "pref.customer-user-premium" + ); + assertRolesString(testAppScopeMappings, + "customer-admin-composite-role", + "customer-admin" + ); + } + } + @Test public void testGroupAttributeUserOneGroupNoMultivalueNoAggregate() throws Exception { // get the user