if (soneRequest.isPOST) {
if (soneRequest.parameters["fetch", 8] == "true") {
soneRescuer.startNextFetch()
+ } else if (soneRequest.parameters["fetchSkip"] == "true") {
+ soneRescuer.startNextFetchWithSkip()
}
redirectTo("rescue.html")
}
}
@Test
+ fun `post request with skipping fetch starts next skipping fetch`() {
+ setMethod(POST)
+ addHttpRequestPart("fetchSkip", "true")
+ verifyRedirect("rescue.html") {
+ verify(soneRescuer).startNextFetchWithSkip()
+ }
+ }
+
+ @Test
fun `page can be created by dependency injection`() {
assertThat(baseInjector.getInstance<RescuePage>(), notNullValue())
}