|
@@ -43,14 +43,14 @@ class KotlinApplicationTests {
|
|
fun `index page is not protected`() {
|
|
fun `index page is not protected`() {
|
|
this.mockMvc.get("/")
|
|
this.mockMvc.get("/")
|
|
.andExpect {
|
|
.andExpect {
|
|
- status { isOk }
|
|
|
|
|
|
+ status { isOk() }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
fun `protected page redirects to login`() {
|
|
fun `protected page redirects to login`() {
|
|
val mvcResult = this.mockMvc.get("/user/index")
|
|
val mvcResult = this.mockMvc.get("/user/index")
|
|
- .andExpect { status { is3xxRedirection } }
|
|
|
|
|
|
+ .andExpect { status { is3xxRedirection() } }
|
|
.andReturn()
|
|
.andReturn()
|
|
|
|
|
|
assertThat(mvcResult.response.redirectedUrl).endsWith("/log-in")
|
|
assertThat(mvcResult.response.redirectedUrl).endsWith("/log-in")
|
|
@@ -79,7 +79,7 @@ class KotlinApplicationTests {
|
|
this.mockMvc.get("/user/index") {
|
|
this.mockMvc.get("/user/index") {
|
|
session = httpSession
|
|
session = httpSession
|
|
}.andExpect {
|
|
}.andExpect {
|
|
- status { isOk }
|
|
|
|
|
|
+ status { isOk() }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|