From 9cf3129d7afa2abb439aba6aadfee0a2c8c784bf Mon Sep 17 00:00:00 2001 From: Eleftheria Stein Date: Tue, 27 Oct 2020 11:20:16 +0100 Subject: [PATCH] Update Kotlin MockMvc result matchers in sample Issue gh-9155 The "style" parameter is no longer supported --- .../security/samples/KotlinApplicationTests.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/boot/kotlin/src/test/kotlin/org/springframework/security/samples/KotlinApplicationTests.kt b/samples/boot/kotlin/src/test/kotlin/org/springframework/security/samples/KotlinApplicationTests.kt index e3fea7da73..393bb0f2e2 100644 --- a/samples/boot/kotlin/src/test/kotlin/org/springframework/security/samples/KotlinApplicationTests.kt +++ b/samples/boot/kotlin/src/test/kotlin/org/springframework/security/samples/KotlinApplicationTests.kt @@ -43,14 +43,14 @@ class KotlinApplicationTests { fun `index page is not protected`() { this.mockMvc.get("/") .andExpect { - status { isOk } + status { isOk() } } } @Test fun `protected page redirects to login`() { val mvcResult = this.mockMvc.get("/user/index") - .andExpect { status { is3xxRedirection } } + .andExpect { status { is3xxRedirection() } } .andReturn() assertThat(mvcResult.response.redirectedUrl).endsWith("/log-in") @@ -79,7 +79,7 @@ class KotlinApplicationTests { this.mockMvc.get("/user/index") { session = httpSession }.andExpect { - status { isOk } + status { isOk() } } } }