File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,17 +36,17 @@ public class IntegrationTest {
36
36
37
37
@ Test public void givenRequestHasBeenMade_whenQueryOverNameAttribute_thenGetJohn () throws Exception {
38
38
// Get John
39
- mockMvc .perform (get ("/personQuery ?name=John" )).andExpect (status ().isOk ()).andExpect (content ().contentType (contentType ))
39
+ mockMvc .perform (get ("/users ?name=John" )).andExpect (status ().isOk ()).andExpect (content ().contentType (contentType ))
40
40
.andExpect (jsonPath ("$" , hasSize (1 ))).andExpect (jsonPath ("$[0].name" , is ("John" )))
41
41
.andExpect (jsonPath ("$[0].address.address" , is ("Fake Street 1" )))
42
- .andExpect (jsonPath ("$[0].address.country" , is ("Fake Country " )));
42
+ .andExpect (jsonPath ("$[0].address.country" , is ("Spain " )));
43
43
}
44
44
45
45
@ Test public void givenRequestHasBeenMade_whenQueryOverNameAttribute_thenGetLisa () throws Exception {
46
46
// Get Lisa
47
- mockMvc .perform (get ("/personQuery ?name=Lisa" )).andExpect (status ().isOk ()).andExpect (content ().contentType (contentType ))
47
+ mockMvc .perform (get ("/users ?name=Lisa" )).andExpect (status ().isOk ()).andExpect (content ().contentType (contentType ))
48
48
.andExpect (jsonPath ("$" , hasSize (1 ))).andExpect (jsonPath ("$[0].name" , is ("Lisa" )))
49
49
.andExpect (jsonPath ("$[0].address.address" , is ("Real Street 1" )))
50
- .andExpect (jsonPath ("$[0].address.country" , is ("Real Country " )));
50
+ .andExpect (jsonPath ("$[0].address.country" , is ("Germany " )));
51
51
}
52
52
}
You can’t perform that action at this time.
0 commit comments