Ignore query parameters while testing the LinkedIn profile picture URL (#23557)

Signed-off-by: Tomas Ondrusko <tondrusk@redhat.com>
This commit is contained in:
Tomas Ondrusko 2023-10-02 14:36:17 +02:00 committed by GitHub
parent 9b719006b0
commit fcb91a83ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -547,7 +547,12 @@ public class SocialLoginTest extends AbstractKeycloakTest {
assertEquals(1, users.size()); assertEquals(1, users.size());
assertNotNull(users.get(0).getAttributes()); assertNotNull(users.get(0).getAttributes());
assertNotNull(users.get(0).getAttributes().get(attrName)); assertNotNull(users.get(0).getAttributes().get(attrName));
assertEquals(expectedValue, users.get(0).getAttributes().get(attrName).get(0)); String attrValue = users.get(0).getAttributes().get(attrName).get(0);
if (currentTestProvider.equals(LINKEDIN) && attrName.equals("picture")) {
assertTrue(attrValue.contains(expectedValue));
} else {
assertEquals(expectedValue, attrValue);
}
} }
private void assertUpdateProfile(boolean firstName, boolean lastName, boolean email) { private void assertUpdateProfile(boolean firstName, boolean lastName, boolean email) {