mirror of
https://github.com/pcvolkmer/mv64e-etl-processor
synced 2025-09-13 09:02:50 +00:00
test: ensure correct view is rendered
This commit is contained in:
@@ -105,12 +105,13 @@ class ConfigControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testShouldShowConfigPageIfLoggedIn() {
|
fun testShouldRequestConfigPageIfLoggedIn() {
|
||||||
mockMvc.get("/configs") {
|
mockMvc.get("/configs") {
|
||||||
with(user("admin").roles("ADMIN"))
|
with(user("admin").roles("ADMIN"))
|
||||||
accept(MediaType.TEXT_HTML)
|
accept(MediaType.TEXT_HTML)
|
||||||
}.andExpect {
|
}.andExpect {
|
||||||
status { isOk() }
|
status { isOk() }
|
||||||
|
view { name("configs") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,6 +137,7 @@ class ConfigControllerTest {
|
|||||||
content = "name=Testtoken"
|
content = "name=Testtoken"
|
||||||
}.andExpect {
|
}.andExpect {
|
||||||
status { is2xxSuccessful() }
|
status { is2xxSuccessful() }
|
||||||
|
view { name("configs/tokens") }
|
||||||
}
|
}
|
||||||
|
|
||||||
val captor = argumentCaptor<String>()
|
val captor = argumentCaptor<String>()
|
||||||
@@ -155,6 +157,7 @@ class ConfigControllerTest {
|
|||||||
content = "name=Testtoken"
|
content = "name=Testtoken"
|
||||||
}.andExpect {
|
}.andExpect {
|
||||||
status { is2xxSuccessful() }
|
status { is2xxSuccessful() }
|
||||||
|
view { name("configs/tokens") }
|
||||||
}
|
}
|
||||||
|
|
||||||
val captor = argumentCaptor<String>()
|
val captor = argumentCaptor<String>()
|
||||||
@@ -170,6 +173,7 @@ class ConfigControllerTest {
|
|||||||
accept(MediaType.TEXT_HTML)
|
accept(MediaType.TEXT_HTML)
|
||||||
}.andExpect {
|
}.andExpect {
|
||||||
status { is2xxSuccessful() }
|
status { is2xxSuccessful() }
|
||||||
|
view { name("configs/tokens") }
|
||||||
}
|
}
|
||||||
|
|
||||||
val captor = argumentCaptor<Long>()
|
val captor = argumentCaptor<Long>()
|
||||||
@@ -185,6 +189,7 @@ class ConfigControllerTest {
|
|||||||
accept(MediaType.TEXT_HTML)
|
accept(MediaType.TEXT_HTML)
|
||||||
}.andExpect {
|
}.andExpect {
|
||||||
status { is2xxSuccessful() }
|
status { is2xxSuccessful() }
|
||||||
|
view { name("configs/userroles") }
|
||||||
}
|
}
|
||||||
|
|
||||||
val captor = argumentCaptor<Long>()
|
val captor = argumentCaptor<Long>()
|
||||||
@@ -202,6 +207,7 @@ class ConfigControllerTest {
|
|||||||
content = "role=ADMIN"
|
content = "role=ADMIN"
|
||||||
}.andExpect {
|
}.andExpect {
|
||||||
status { is2xxSuccessful() }
|
status { is2xxSuccessful() }
|
||||||
|
view { name("configs/userroles") }
|
||||||
}
|
}
|
||||||
|
|
||||||
val idCaptor = argumentCaptor<Long>()
|
val idCaptor = argumentCaptor<Long>()
|
||||||
|
@@ -74,6 +74,7 @@ class LoginControllerTest {
|
|||||||
fun testShouldRequestLoginPage() {
|
fun testShouldRequestLoginPage() {
|
||||||
mockMvc.get("/login").andExpect {
|
mockMvc.get("/login").andExpect {
|
||||||
status { isOk() }
|
status { isOk() }
|
||||||
|
view { name("login") }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user