diff options
| author | Paul-Christian Volkmer | 2024-07-15 11:59:00 +0200 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2024-07-15 11:59:00 +0200 |
| commit | 464c8b8c1d29aabef21b34d1a69028ad2922f82f (patch) | |
| tree | 129a3ce9fb58f9a9db23965ee9f6b35764d2aa2c /src/integrationTest | |
| parent | 3f1bb4f4e24c7c7b7d57b640d8603242f306b720 (diff) | |
refactor: use dedicated type for path param
Diffstat (limited to 'src/integrationTest')
| -rw-r--r-- | src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt index 80c17d2..82835b4 100644 --- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt +++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt @@ -201,6 +201,39 @@ class HomeControllerTest { assertThat(page.querySelectorAll("div.notification.info")).isEmpty() } + @Test + @WithMockUser(username = "admin", roles = ["ADMIN"]) + fun testShouldShowPatientPseudonym() { + whenever(requestService.findRequestByPatientId(anyValueClass(), any<Pageable>())).thenReturn( + PageImpl( + listOf( + Request( + 2L, + randomRequestId(), + PatientPseudonym("PSEUDO1"), + PatientId("PATIENT1"), + Fingerprint("ashdkasdh"), + RequestType.MTB_FILE, + RequestStatus.SUCCESS + ), + Request( + 1L, + randomRequestId(), + PatientPseudonym("PSEUDO1"), + PatientId("PATIENT1"), + Fingerprint("asdasdasd"), + RequestType.MTB_FILE, + RequestStatus.ERROR + ) + ) + ) + ) + + val page = webClient.getPage<HtmlPage>("http://localhost/patient/PSEUDO1") + assertThat(page.querySelectorAll("h2 > span")).hasSize(1) + assertThat(page.querySelectorAll("h2 > span").first().textContent).isEqualTo("PSEUDO1") + } + } @Nested |
