diff options
Diffstat (limited to 'ufund-api/src/test/java/com/ufund')
| -rw-r--r-- | ufund-api/src/test/java/com/ufund/api/ufundapi/controller/CupboardControllerTest.java | 18 | 
1 files changed, 11 insertions, 7 deletions
diff --git a/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/CupboardControllerTest.java b/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/CupboardControllerTest.java index 4702771..75dbf84 100644 --- a/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/CupboardControllerTest.java +++ b/ufund-api/src/test/java/com/ufund/api/ufundapi/controller/CupboardControllerTest.java @@ -97,12 +97,14 @@ public class CupboardControllerTest {      @Test      public void createNeedConflict() throws IOException, DuplicateKeyException { -        when(mockCupboardService.createNeed("Name", "Atlantis", 100, Need.GoalType.MONETARY, false)).thenThrow(new DuplicateKeyException("")); +        when(mockCupboardService.createNeed("Test", "Atlantis", 100, Need.GoalType.MONETARY, false)).thenThrow(new DuplicateKeyException(""));          Map<String, Object> needMap = Map.ofEntries( -                entry("name", "Name"), -                entry("maxGoal", 100.0), -                entry("type", "MONETARY") +                entry("name", "Test"), +                entry("location", "Atlantis"), +                entry("maxGoal", 100), +                entry("type", "MONETARY"), +                entry("urgent", false)          );          var res = cupboardController.createNeed(needMap, key); @@ -115,9 +117,11 @@ public class CupboardControllerTest {          doThrow(new IllegalAccessException()).when(mockAuthService).keyHasAccessToCupboard(key);          Map<String, Object> needMap = Map.ofEntries( -                entry("name", "Name"), -                entry("maxGoal", 100.0), -                entry("type", "MONETARY") +                entry("name", "Test"), +                entry("location", "Atlantis"), +                entry("maxGoal", 100), +                entry("type", "MONETARY"), +                entry("urgent", false)          );          var res = cupboardController.createNeed(needMap, key);  | 
