mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
产品管理controller单元测试 http method修正
This commit is contained in:
+2
-2
@@ -94,7 +94,7 @@ public class ProductsControllerTest {
|
|||||||
Long id = 1L;
|
Long id = 1L;
|
||||||
doNothing().when(productsService).update(any());
|
doNothing().when(productsService).update(any());
|
||||||
|
|
||||||
mockMvc.perform(post("/system/products/freeze")
|
mockMvc.perform(put("/system/products/freeze")
|
||||||
.param("id", id.toString()))
|
.param("id", id.toString()))
|
||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(jsonPath("$.data").value(true));
|
.andExpect(jsonPath("$.data").value(true));
|
||||||
@@ -108,7 +108,7 @@ public class ProductsControllerTest {
|
|||||||
Long id = 2L;
|
Long id = 2L;
|
||||||
doNothing().when(productsService).update(any());
|
doNothing().when(productsService).update(any());
|
||||||
|
|
||||||
mockMvc.perform(post("/system/products/melt")
|
mockMvc.perform(put("/system/products/melt")
|
||||||
.param("id", id.toString()))
|
.param("id", id.toString()))
|
||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(jsonPath("$.data").value(true));
|
.andExpect(jsonPath("$.data").value(true));
|
||||||
|
|||||||
Reference in New Issue
Block a user