Skip to content

Commit 9cf3129

Browse files
committed
Update Kotlin MockMvc result matchers in sample
Issue gh-9155 The "style" parameter is no longer supported
1 parent aac6d2f commit 9cf3129

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

samples/boot/kotlin/src/test/kotlin/org/springframework/security/samples/KotlinApplicationTests.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ class KotlinApplicationTests {
4343
fun `index page is not protected`() {
4444
this.mockMvc.get("/")
4545
.andExpect {
46-
status { isOk }
46+
status { isOk() }
4747
}
4848
}
4949

5050
@Test
5151
fun `protected page redirects to login`() {
5252
val mvcResult = this.mockMvc.get("/user/index")
53-
.andExpect { status { is3xxRedirection } }
53+
.andExpect { status { is3xxRedirection() } }
5454
.andReturn()
5555

5656
assertThat(mvcResult.response.redirectedUrl).endsWith("/log-in")
@@ -79,7 +79,7 @@ class KotlinApplicationTests {
7979
this.mockMvc.get("/user/index") {
8080
session = httpSession
8181
}.andExpect {
82-
status { isOk }
82+
status { isOk() }
8383
}
8484
}
8585
}

0 commit comments

Comments
 (0)