mirror of
				https://github.com/spring-projects/spring-security.git
				synced 2025-10-30 22:28:46 +00:00 
			
		
		
		
	Update Kotlin MockMvc result matchers in sample
Issue gh-9155 The "style" parameter is no longer supported
This commit is contained in:
		
							parent
							
								
									aac6d2f56b
								
							
						
					
					
						commit
						9cf3129d7a
					
				| @ -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() } | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user