summaryrefslogtreecommitdiff
path: root/src/integrationTest/kotlin/dev/dnpm
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2025-09-03 21:18:28 +0200
committerGitHub2025-09-03 21:18:28 +0200
commit6dfec5c341862cdb5bbe8246937c9bfc8bd5a2f1 (patch)
tree7d968ba438ac52fbcf2fad14d7b0757b27ab65eb /src/integrationTest/kotlin/dev/dnpm
parent4602032bcfc0ffad18d83555f2048229bc538b23 (diff)
fix: add status badge for 'NO_CONSENT' (#149)
Diffstat (limited to 'src/integrationTest/kotlin/dev/dnpm')
-rw-r--r--src/integrationTest/kotlin/dev/dnpm/etl/processor/web/HomeControllerTest.kt24
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")
+ }
}
}