Remove unnecessary line breaks.
This commit is contained in:
parent
39cc6be1ab
commit
eba9e9aed7
@ -31,10 +31,11 @@ public class GraphqlControllerIntegrationTest {
|
|||||||
@Test
|
@Test
|
||||||
public void givenNoBooks_whenReadAll_thenStatusIsOk() throws Exception {
|
public void givenNoBooks_whenReadAll_thenStatusIsOk() throws Exception {
|
||||||
|
|
||||||
String getAllBooksQuery = "{\n" + " getAllBooks {\n" + " id\n" + " author\n" + " title\n" + " }\n" + "}\n";
|
String getAllBooksQuery = "{ getAllBooks {id author title } }";
|
||||||
|
|
||||||
this.mockMvc.perform(post(GRAPHQL_PATH).content(toJSON(getAllBooksQuery))
|
this.mockMvc.perform(post(GRAPHQL_PATH).content(toJSON(getAllBooksQuery))
|
||||||
.contentType(MediaType.APPLICATION_JSON))
|
.contentType(
|
||||||
|
MediaType.APPLICATION_JSON))
|
||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(jsonPath("$.getAllBooks").isEmpty());
|
.andExpect(jsonPath("$.getAllBooks").isEmpty());
|
||||||
}
|
}
|
||||||
@ -42,7 +43,8 @@ public class GraphqlControllerIntegrationTest {
|
|||||||
@Test
|
@Test
|
||||||
public void whenAddBook_thenStatusIsOk() throws Exception {
|
public void whenAddBook_thenStatusIsOk() throws Exception {
|
||||||
|
|
||||||
String addBookMutation = "mutation {\n" + " addBook(newBook: {id: 123, author: \"J.R.R. Tolkien\", title: \"The Lord of the Rings\"}) {\n" + " id\n" + " author\n" + " title\n" + " }\n" + "}\n";
|
String addBookMutation = "mutation { addBook(newBook: {id: 123, author: \"J.R.R. Tolkien\", "
|
||||||
|
+ "title: \"The Lord of the Rings\"}) { id author title } }";
|
||||||
|
|
||||||
this.mockMvc.perform(post(GRAPHQL_PATH).content(toJSON(addBookMutation))
|
this.mockMvc.perform(post(GRAPHQL_PATH).content(toJSON(addBookMutation))
|
||||||
.contentType(MediaType.APPLICATION_JSON))
|
.contentType(MediaType.APPLICATION_JSON))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user