Fix Spring 5 tests

This commit is contained in:
pivovarit 2017-05-05 17:45:28 +02:00
parent e72744dbd0
commit 744799630f
1 changed files with 2 additions and 3 deletions

View File

@ -21,7 +21,7 @@ public class FormHandler {
.filter(formData -> "baeldung".equals(formData.get("user")))
.filter(formData -> "you_know_what_to_do".equals(formData.get("token")))
.flatMap(formData -> ok().body(Mono.just("welcome back!"), String.class))
.or(ServerResponse.badRequest().build());
.switchIfEmpty(ServerResponse.badRequest().build());
}
Mono<ServerResponse> handleUpload(ServerRequest request) {
@ -34,8 +34,7 @@ public class FormHandler {
.asByteBuffer()
.array().length));
return ok()
.body(fromObject(atomicLong.toString()));
return ok().body(fromObject(atomicLong.toString()));
});
}
}