|
|
@@ -58,7 +58,7 @@ public class UserControllerTest {
|
|
|
userFormVO.setPassword(password);
|
|
|
String requestJson = ow.writeValueAsString(userFormVO);
|
|
|
|
|
|
- mockMvc.perform(post("/user/login")
|
|
|
+ mockMvc.perform(post("/api/user/login")
|
|
|
.contentType(MediaType.APPLICATION_JSON).content(requestJson))
|
|
|
.andExpect(MockMvcResultMatchers.status().isOk())
|
|
|
.andExpect(MockMvcResultMatchers.content()
|
|
|
@@ -85,7 +85,7 @@ public class UserControllerTest {
|
|
|
ObjectMapper mapper = new ObjectMapper();
|
|
|
ObjectWriter ow = mapper.writer().withDefaultPrettyPrinter();
|
|
|
|
|
|
- mockMvc.perform(get("/user/2")
|
|
|
+ mockMvc.perform(get("/api/user/2")
|
|
|
.contentType(MediaType.APPLICATION_JSON))
|
|
|
.andExpect(MockMvcResultMatchers.status().isOk())
|
|
|
.andExpect(MockMvcResultMatchers.content()
|
|
|
@@ -113,7 +113,7 @@ public class UserControllerTest {
|
|
|
rechargeOrderVO.setCreateTime(new Date());
|
|
|
String requestJson = ow.writeValueAsString(rechargeOrderVO);
|
|
|
|
|
|
- mockMvc.perform(post("/user/recharge")
|
|
|
+ mockMvc.perform(post("/api/user/recharge")
|
|
|
.contentType(MediaType.APPLICATION_JSON).content(requestJson))
|
|
|
.andExpect(MockMvcResultMatchers.status().isOk())
|
|
|
.andExpect(jsonPath("$.msg", is("充值成功")));
|