Issue
In spring mvc mock kotlin, what is the import class for the status and the isok
thankyou
import ???
@Test
fun findUser() {
mockMvc.get("/users?id=99")
.andExpect {
status { isOk }
}
Solution
The following should work:
import org.springframework.test.web.servlet.result.StatusResultMatchers
@Test
fun findUser() {
mockMvc.get("/users?id=99")
.andExpect {
status { isOk() }
}
}
Answered By - João Dias