Przeglądaj źródła

fix: HealthReportControllerTest 适配 listReports 方法签名变更

iwt 1 miesiąc temu
rodzic
commit
05866d35a9

+ 3 - 3
cfc-backend/src/test/java/com/etotem/cfc/controller/HealthReportControllerTest.java

@@ -207,7 +207,7 @@ public class HealthReportControllerTest {
         Map<String, Object> params = new HashMap<>();
         params.put("childId", 5);
 
-        Result<List<HealthReport>> result = controller.listReports(params, 5L);
+        Result<List<HealthReport>> result = controller.listReports(params, 5L, 5L);
         assertEquals(200, result.getCode());
         assertEquals(2, result.getData().size());
     }
@@ -219,7 +219,7 @@ public class HealthReportControllerTest {
         Map<String, Object> params = new HashMap<>();
         params.put("childId", 5);
 
-        Result<List<HealthReport>> result = controller.listReports(params, 5L);
+        Result<List<HealthReport>> result = controller.listReports(params, 5L, 5L);
         assertEquals(200, result.getCode());
         assertTrue(result.getData().isEmpty());
     }
@@ -227,7 +227,7 @@ public class HealthReportControllerTest {
     @Test
     public void listReports_MissingChildId() {
         Map<String, Object> params = new HashMap<>();
-        Result<List<HealthReport>> result = controller.listReports(params, null);
+        Result<List<HealthReport>> result = controller.listReports(params, 1L, null);
         assertEquals(500, result.getCode());
     }