spring-guides / gs-reactive-rest-service

Building a Reactive RESTful Web Service :: Learn how to create a RESTful web service with Reactive Spring and consume it with WebClient.

Home Page:https://spring.io/guides/gs/reactive-rest-service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test always succeeds

bytefighter opened this issue · comments

When I change the string "Hello, Spring!" in the.expectBody().equals("Hello, Spring!");
in the GreetingRouterTest to another string for example "Hello, Spring123!" the test still succeeds.

Changing it to .expectBody(String.class).isEqualTo("Hello, Spring123!"); Makes the test fail for incorrect strings.

Because I'm new to spring I would like to know why the test succeeded when the strings where different.

By the way, thanks for the example.