Fix some tests
There is one behaviour change (you have to POST an array to a function endpoint if you are sending a body), and also a message converter that needed to be removed so that arrays are not toStringed in the response body.
This commit is contained in:
@@ -41,14 +41,14 @@ public class SampleApplicationTests {
|
||||
public void words() {
|
||||
assertThat(new TestRestTemplate()
|
||||
.getForObject("http://localhost:" + port + "/words", String.class))
|
||||
.isEqualTo("{\"value\":\"foo\"}{\"value\":\"bar\"}");
|
||||
.isEqualTo("[{\"value\":\"foo\"},{\"value\":\"bar\"}]");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void uppercase() {
|
||||
assertThat(new TestRestTemplate().postForObject(
|
||||
"http://localhost:" + port + "/uppercase", "{\"value\":\"foo\"}",
|
||||
String.class)).isEqualTo("{\"value\":\"FOO\"}");
|
||||
"http://localhost:" + port + "/uppercase", "[{\"value\":\"foo\"}]",
|
||||
String.class)).isEqualTo("[{\"value\":\"FOO\"}]");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user