diff --git a/rest/taskana-rest-spring/src/test/java/pro/taskana/common/rest/AccessIdControllerIntTest.java b/rest/taskana-rest-spring/src/test/java/pro/taskana/common/rest/AccessIdControllerIntTest.java index 2a68a06cd..eb95b6a1d 100644 --- a/rest/taskana-rest-spring/src/test/java/pro/taskana/common/rest/AccessIdControllerIntTest.java +++ b/rest/taskana-rest-spring/src/test/java/pro/taskana/common/rest/AccessIdControllerIntTest.java @@ -76,6 +76,23 @@ class AccessIdControllerIntTest { .containsExactlyInAnyOrder("Schläfrig, Tim", "Eifrig, Elena"); } + @Test + void should_returnAccessIdWithUmlauten_ifBased64EncodedUserIsLookedUp() { + ResponseEntity> response = + template.exchange( + restHelper.toUrl(Mapping.URL_ACCESSID) + "?search-for=läf", + HttpMethod.GET, + restHelper.defaultRequest(), + ParameterizedTypeReference.forType(AccessIdListResource.class)); + + List body = response.getBody(); + assertThat(body).isNotNull(); + assertThat(body).hasSize(1); + assertThat(body) + .extracting(AccessIdRepresentationModel::getName) + .containsExactlyInAnyOrder("Schläfrig, Tim"); + } + @Test void testBadRequestWhenSearchForIsTooShort() { ThrowingCallable httpCall = diff --git a/rest/taskana-rest-spring/src/test/resources/taskana-test.ldif b/rest/taskana-rest-spring/src/test/resources/taskana-test.ldif index 8d1b56686..451300e5e 100644 --- a/rest/taskana-rest-spring/src/test/resources/taskana-test.ldif +++ b/rest/taskana-rest-spring/src/test/resources/taskana-test.ldif @@ -156,9 +156,9 @@ objectclass: top givenName: Tim description: desc uid: user-2-2 -sn: Schläfrig +sn:: U2NobMOkZnJpZw== ou: Organisationseinheit/Organisationseinheit KSC/Organisationseinheit KSC 2 -cn: Tim Schläfrig +cn:: VGltIFNjaGzDpGZyaWc= userPassword: user-2-1 ########################