@@ -7367,7 +7367,7 @@ no other expectations will be asserted.
7367
7367
import org.springframework.test.web.servlet.get
7368
7368
7369
7369
mockMvc.get("/accounts/1").andExpect {
7370
- status(). isOk()
7370
+ status { isOk() }
7371
7371
}
7372
7372
----
7373
7373
@@ -7415,7 +7415,7 @@ The following test asserts that binding or validation failed:
7415
7415
import org.springframework.test.web.servlet.post
7416
7416
7417
7417
mockMvc.post("/persons").andExpect {
7418
- status(). isOk()
7418
+ status { isOk() }
7419
7419
model {
7420
7420
attributeHasErrors("person")
7421
7421
}
@@ -7443,7 +7443,7 @@ request. You can do so as follows, where `print()` is a static import from
7443
7443
mockMvc.post("/persons").andDo {
7444
7444
print()
7445
7445
}.andExpect {
7446
- status(). isOk()
7446
+ status { isOk() }
7447
7447
model {
7448
7448
attributeHasErrors("person")
7449
7449
}
@@ -7473,7 +7473,7 @@ other expectations, as the following example shows:
7473
7473
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
7474
7474
.Kotlin
7475
7475
----
7476
- var mvcResult = mockMvc.post("/persons").andExpect { status(). isOk() }.andReturn()
7476
+ var mvcResult = mockMvc.post("/persons").andExpect { status { isOk() } }.andReturn()
7477
7477
// ...
7478
7478
----
7479
7479
@@ -7593,7 +7593,7 @@ or reactive type such as Reactor `Mono`:
7593
7593
@Test
7594
7594
fun test() {
7595
7595
var mvcResult = mockMvc.get("/path").andExpect {
7596
- status(). isOk() // <1>
7596
+ status { isOk() } // <1>
7597
7597
request { asyncStarted() } // <2>
7598
7598
// TODO Remove unused generic parameter
7599
7599
request { asyncResult<Nothing>("body") } // <3>
@@ -7602,7 +7602,7 @@ or reactive type such as Reactor `Mono`:
7602
7602
7603
7603
mockMvc.perform(asyncDispatch(mvcResult)) // <4>
7604
7604
.andExpect {
7605
- status(). isOk() // <5>
7605
+ status { isOk() } // <5>
7606
7606
content().string("body")
7607
7607
}
7608
7608
}
0 commit comments