diff options
| author | Paul-Christian Volkmer | 2025-09-03 22:03:52 +0200 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2025-09-03 22:03:52 +0200 |
| commit | 10b5bedac33b3d0f8b970e818c444e86e132da21 (patch) | |
| tree | 884f08e100643db036125947426061b662cfd5aa /src/integrationTest/kotlin/dev/dnpm | |
| parent | 96f22a67447506c14304d33b8c16bfba4c3abed2 (diff) | |
| parent | 6dfec5c341862cdb5bbe8246937c9bfc8bd5a2f1 (diff) | |
Merge branch '0.11.x'
# Conflicts:
# build.gradle.kts
Diffstat (limited to 'src/integrationTest/kotlin/dev/dnpm')
| -rw-r--r-- | src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt | 24 |
1 files changed, 24 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 829f9a1..628112c 100644 --- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt +++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt @@ -282,6 +282,30 @@ class HomeControllerTest { assertThat(page.querySelectorAll("tbody tr")).isEmpty() assertThat(page.querySelectorAll("div.notification.info")).hasSize(1) } + + @Test + @WithMockUser(username = "admin", roles = ["ADMIN"]) + fun testShouldShowNoConsentStatusBadge() { + whenever(requestService.findRequestByPatientId(anyValueClass(), any<Pageable>())).thenReturn( + PageImpl( + listOf( + Request( + 1L, + randomRequestId(), + PatientPseudonym("PSEUDO1"), + PatientId("PATIENT1"), + Fingerprint("ashdkasdh"), + RequestType.MTB_FILE, + RequestStatus.NO_CONSENT + ) + ) + ) + ) + + val page = webClient.getPage<HtmlPage>("http://localhost/patient/PSEUDO1") + assertThat(page.querySelectorAll("tbody tr")).hasSize(1) + assertThat(page.querySelectorAll("tbody tr > td > small").first().textContent).isEqualTo("NO_CONSENT") + } } } |
