diff options
| author | Paul-Christian Volkmer | 2024-05-06 13:32:51 +0200 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2024-05-06 13:33:36 +0200 |
| commit | 9c6bd64a7e73ce3503a358cd6416c1f605380f11 (patch) | |
| tree | d4965ac82b6efa58e2cf60a52765797ee937520f /src/integrationTest/kotlin/dev | |
| parent | 6567aa803cebcda10d3c69c91869cab7bc3c4845 (diff) | |
test: ensure correct view is rendered
Diffstat (limited to 'src/integrationTest/kotlin/dev')
| -rw-r--r-- | src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt | 8 | ||||
| -rw-r--r-- | src/integrationTest/kotlin/dev/dnpm/etl/processor/web/LoginControllerTest.kt | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt index 1d97d88..e244b3d 100644 --- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt +++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/ConfigControllerTest.kt @@ -105,12 +105,13 @@ class ConfigControllerTest { } @Test - fun testShouldShowConfigPageIfLoggedIn() { + fun testShouldRequestConfigPageIfLoggedIn() { mockMvc.get("/configs") { with(user("admin").roles("ADMIN")) accept(MediaType.TEXT_HTML) }.andExpect { status { isOk() } + view { name("configs") } } } @@ -136,6 +137,7 @@ class ConfigControllerTest { content = "name=Testtoken" }.andExpect { status { is2xxSuccessful() } + view { name("configs/tokens") } } val captor = argumentCaptor<String>() @@ -155,6 +157,7 @@ class ConfigControllerTest { content = "name=Testtoken" }.andExpect { status { is2xxSuccessful() } + view { name("configs/tokens") } } val captor = argumentCaptor<String>() @@ -170,6 +173,7 @@ class ConfigControllerTest { accept(MediaType.TEXT_HTML) }.andExpect { status { is2xxSuccessful() } + view { name("configs/tokens") } } val captor = argumentCaptor<Long>() @@ -185,6 +189,7 @@ class ConfigControllerTest { accept(MediaType.TEXT_HTML) }.andExpect { status { is2xxSuccessful() } + view { name("configs/userroles") } } val captor = argumentCaptor<Long>() @@ -202,6 +207,7 @@ class ConfigControllerTest { content = "role=ADMIN" }.andExpect { status { is2xxSuccessful() } + view { name("configs/userroles") } } val idCaptor = argumentCaptor<Long>() diff --git a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/LoginControllerTest.kt b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/LoginControllerTest.kt index 254eb18..83cf1b8 100644 --- a/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/LoginControllerTest.kt +++ b/src/integrationTest/kotlin/dev/dnpm/etl/processor/web/LoginControllerTest.kt @@ -74,6 +74,7 @@ class LoginControllerTest { fun testShouldRequestLoginPage() { mockMvc.get("/login").andExpect { status { isOk() } + view { name("login") } } } |
