diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt index e89adfbce3..8808ca39fc 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AnonymousDslTests.kt @@ -119,7 +119,7 @@ class AnonymousDslTests { this.mockMvc.get("/principal") .andExpect { - status { isOk } + status { isOk() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt index d0f27b1350..68b6822542 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/AuthorizeRequestsDslTests.kt @@ -65,7 +65,7 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/private") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -75,7 +75,7 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/path") .andExpect { - status { isOk } + status { isOk() } } } @@ -85,12 +85,12 @@ class AuthorizeRequestsDslTests { this.mockMvc.post("/onlyPostPermitted") { with(csrf()) } .andExpect { - status { isOk } + status { isOk() } } this.mockMvc.get("/onlyPostPermitted") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -125,7 +125,7 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/private") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -135,17 +135,17 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/path") .andExpect { - status { isOk } + status { isOk() } } this.mockMvc.get("/path.html") .andExpect { - status { isOk } + status { isOk() } } this.mockMvc.get("/path/") .andExpect { - status { isOk } + status { isOk() } } } @@ -182,12 +182,12 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/user/user") .andExpect { - status { isOk } + status { isOk() } } this.mockMvc.get("/user/deny") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -217,7 +217,7 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/") { with(httpBasic("admin", "password")) }.andExpect { - status { isOk } + status { isOk() } } } @@ -228,7 +228,7 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/") { with(httpBasic("user", "password")) }.andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -274,13 +274,13 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/") { with(httpBasic("user", "password")) }.andExpect { - status { isOk } + status { isOk() } } this.mockMvc.get("/") { with(httpBasic("admin", "password")) }.andExpect { - status { isOk } + status { isOk() } } } @@ -291,7 +291,7 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/") { with(httpBasic("other", "password")) }.andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -342,13 +342,13 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/") { with(httpBasic("user", "password")) }.andExpect { - status { isOk } + status { isOk() } } this.mockMvc.get("/") { with(httpBasic("admin", "password")) }.andExpect { - status { isOk } + status { isOk() } } } @@ -359,7 +359,7 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/") { with(httpBasic("other", "password")) }.andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -469,12 +469,12 @@ class AuthorizeRequestsDslTests { this.mockMvc.get("/path") .andExpect { - status { isOk } + status { isOk() } } this.mockMvc.put("/path") { with(csrf()) } .andExpect { - status { isForbidden } + status { isForbidden() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt index d62ff5c8b9..9ab275e7d9 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/CsrfDslTests.kt @@ -62,7 +62,7 @@ class CsrfDslTests { this.mockMvc.post("/test1") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -73,7 +73,7 @@ class CsrfDslTests { this.mockMvc.post("/test1") { with(csrf()) }.andExpect { - status { isOk } + status { isOk() } } } @@ -93,7 +93,7 @@ class CsrfDslTests { this.mockMvc.post("/test1") .andExpect { - status { isOk } + status { isOk() } } } @@ -141,12 +141,12 @@ class CsrfDslTests { this.mockMvc.post("/test1") .andExpect { - status { isForbidden } + status { isForbidden() } } this.mockMvc.post("/test2") .andExpect { - status { isOk } + status { isOk() } } } @@ -204,12 +204,12 @@ class CsrfDslTests { this.mockMvc.post("/test1") .andExpect { - status { isForbidden } + status { isForbidden() } } this.mockMvc.post("/test2") .andExpect { - status { isOk } + status { isOk() } } } @@ -231,12 +231,12 @@ class CsrfDslTests { this.mockMvc.post("/test1") .andExpect { - status { isForbidden } + status { isForbidden() } } this.mockMvc.post("/test2") .andExpect { - status { isOk } + status { isOk() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt index dda4904b9e..da23a5ff45 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/ExceptionHandlingDslTests.kt @@ -52,7 +52,7 @@ class ExceptionHandlingDslTests { this.mockMvc.get("/") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -97,7 +97,7 @@ class ExceptionHandlingDslTests { this.mockMvc.get("/admin") { with(user(withUsername("user").password("password").roles("USER").build())) }.andExpect { - status { isForbidden } + status { isForbidden() } forwardedUrl("/access-denied") } } @@ -125,7 +125,7 @@ class ExceptionHandlingDslTests { this.mockMvc.get("/admin") { with(user(withUsername("user").password("password").roles("USER").build())) }.andExpect { - status { isForbidden } + status { isForbidden() } forwardedUrl("/access-denied") } } @@ -155,14 +155,14 @@ class ExceptionHandlingDslTests { this.mockMvc.get("/admin1") { with(user(withUsername("user").password("password").roles("USER").build())) }.andExpect { - status { isForbidden } + status { isForbidden() } forwardedUrl("/access-denied1") } this.mockMvc.get("/admin2") { with(user(withUsername("user").password("password").roles("USER").build())) }.andExpect { - status { isForbidden } + status { isForbidden() } forwardedUrl("/access-denied2") } } @@ -195,7 +195,7 @@ class ExceptionHandlingDslTests { this.mockMvc.get("/") .andExpect { - status { isFound } + status { isFound() } redirectedUrl("http://localhost/custom-login") } } @@ -221,13 +221,13 @@ class ExceptionHandlingDslTests { this.mockMvc.get("/secured1") .andExpect { - status { isFound } + status { isFound() } redirectedUrl("http://localhost/custom-login1") } this.mockMvc.get("/secured2") .andExpect { - status { isFound } + status { isFound() } redirectedUrl("http://localhost/custom-login2") } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt index e1f7c5b0fb..3980769c64 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/FormLoginDslTests.kt @@ -55,7 +55,7 @@ class FormLoginDslTests { this.mockMvc.get("/login") .andExpect { - status { isOk } + status { isOk() } } } @@ -96,7 +96,7 @@ class FormLoginDslTests { this.mockMvc.get("/") .andExpect { - status { isFound } + status { isFound() } redirectedUrl("http://localhost/login") } } @@ -119,7 +119,7 @@ class FormLoginDslTests { this.mockMvc.get("/") .andExpect { - status { isFound } + status { isFound() } redirectedUrl("http://localhost/log-in") } } @@ -254,7 +254,7 @@ class FormLoginDslTests { this.mockMvc.get("/custom/login") .andExpect { - status { isOk } + status { isOk() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt index 3a45d81075..6e3a9af38f 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpBasicDslTests.kt @@ -61,7 +61,7 @@ class HttpBasicDslTests { this.mockMvc.get("/") .andExpect { - status { isUnauthorized } + status { isUnauthorized() } } } @@ -82,7 +82,7 @@ class HttpBasicDslTests { this.mockMvc.get("/") { with(httpBasic("user", "password")) }.andExpect { - status { isOk } + status { isOk() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt index f603dff3a5..ec3690ac18 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/HttpSecurityDslTests.kt @@ -63,7 +63,7 @@ class HttpSecurityDslTests { this.mockMvc.post("/") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -124,7 +124,7 @@ class HttpSecurityDslTests { this.mockMvc.get("/") .andExpect { - status { isNotFound } + status { isNotFound() } } } @@ -134,7 +134,7 @@ class HttpSecurityDslTests { this.mockMvc.get("/path") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -156,7 +156,7 @@ class HttpSecurityDslTests { this.mockMvc.get("/") .andExpect { - status { isNotFound } + status { isNotFound() } } } @@ -166,7 +166,7 @@ class HttpSecurityDslTests { this.mockMvc.get("/path") .andExpect { - status { isForbidden } + status { isForbidden() } } } @@ -189,17 +189,17 @@ class HttpSecurityDslTests { this.mockMvc.get("/path1") .andExpect { - status { isForbidden } + status { isForbidden() } } this.mockMvc.get("/path2") .andExpect { - status { isForbidden } + status { isForbidden() } } this.mockMvc.get("/path3") .andExpect { - status { isNotFound } + status { isNotFound() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt index 350a288bd5..02cf51379a 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/LogoutDslTests.kt @@ -58,7 +58,7 @@ class LogoutDslTests { this.mockMvc.post("/custom/logout") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login?logout") } } @@ -81,7 +81,7 @@ class LogoutDslTests { this.mockMvc.post("/custom/logout") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login?logout") } } @@ -104,7 +104,7 @@ class LogoutDslTests { this.mockMvc.post("/logout") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login") } } @@ -127,7 +127,7 @@ class LogoutDslTests { this.mockMvc.post("/logout") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/") } } @@ -150,7 +150,7 @@ class LogoutDslTests { this.mockMvc.post("/custom/logout") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login?logout") } } @@ -182,7 +182,7 @@ class LogoutDslTests { with(csrf()) session = currentSession }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login?logout") } @@ -209,7 +209,7 @@ class LogoutDslTests { with(csrf()) session = currentSession }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login?logout") } @@ -234,7 +234,7 @@ class LogoutDslTests { this.mockMvc.post("/logout") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login?logout") cookie { maxAge("remove", 0) } } @@ -258,14 +258,14 @@ class LogoutDslTests { this.mockMvc.post("/logout/default") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/login?logout") } this.mockMvc.post("/logout/custom") { with(csrf()) }.andExpect { - status { isFound } + status { isFound() } redirectedUrl("/") } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt index 6eaff435a7..f2fb0b82f5 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/OAuth2LoginDslTests.kt @@ -72,7 +72,7 @@ class OAuth2LoginDslTests { this.mockMvc.get("/login") .andExpect { - status { isOk } + status { isOk() } } } @@ -91,7 +91,7 @@ class OAuth2LoginDslTests { this.mockMvc.get("/custom-login") .andExpect { - status { isOk } + status { isOk() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt index bf6dd2f85e..bc2f968e10 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/Saml2DslTests.kt @@ -72,7 +72,7 @@ class Saml2DslTests { this.mockMvc.get("/login") .andExpect { - status { isOk } + status { isOk() } } } diff --git a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt index 04e193dc7d..a49afbb473 100644 --- a/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt +++ b/config/src/test/kotlin/org/springframework/security/config/web/servlet/oauth2/resourceserver/OpaqueTokenDslTests.kt @@ -72,7 +72,7 @@ class OpaqueTokenDslTests { this.mockMvc.get("/authenticated") { header("Authorization", "Bearer token") }.andExpect { - status { isOk } + status { isOk() } content { string("test-subject") } } }