aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiederick de Vries <diederick@diederickdevries.net>2018-09-17 17:06:09 +0200
committerDiederick de Vries <diederick@diederickdevries.net>2018-09-17 17:06:09 +0200
commit08d1ab7c9ebef45e204d5900481ff82ff02b2587 (patch)
tree5a1a885348c4e84905ed318fad9612c9fa327c7a
parent8d6cd95fd0f061b976f5d04bdcf63cafb74f0fb7 (diff)
downloadboodschapi-08d1ab7c9ebef45e204d5900481ff82ff02b2587.tar.gz
boodschapi-08d1ab7c9ebef45e204d5900481ff82ff02b2587.tar.bz2
boodschapi-08d1ab7c9ebef45e204d5900481ff82ff02b2587.zip
Use findById() instead of getOne()feat-dedouble-groceries
-rw-r--r--src/test/java/net/diederickdevries/boodschapi/controller/GroceryControllerIT.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/java/net/diederickdevries/boodschapi/controller/GroceryControllerIT.java b/src/test/java/net/diederickdevries/boodschapi/controller/GroceryControllerIT.java
index c350a00..57503a0 100644
--- a/src/test/java/net/diederickdevries/boodschapi/controller/GroceryControllerIT.java
+++ b/src/test/java/net/diederickdevries/boodschapi/controller/GroceryControllerIT.java
@@ -178,9 +178,9 @@ public class GroceryControllerIT
178 178
179 ResponseEntity response = groceryController.edit(grocery.getId(), existingName); 179 ResponseEntity response = groceryController.edit(grocery.getId(), existingName);
180 180
181 Grocery groceryFound = groceryRepository.getOne(grocery.getId()); 181 Grocery groceryFound = groceryRepository.findById(grocery.getId()).orElse(null);
182 Item itemFound = itemRepository.getOne(item.getId()); 182 Item itemFound = itemRepository.findById(item.getId()).orElse(null);
183 Ingredient ingredientFound = ingredientRepository.getOne(ingredient.getId()); 183 Ingredient ingredientFound = ingredientRepository.findById(ingredient.getId()).orElse(null);
184 184
185 assertEquals("The response status is 301", 301, response.getStatusCodeValue()); 185 assertEquals("The response status is 301", 301, response.getStatusCodeValue());
186 assertNull("The renamed grocery is not found", groceryFound); 186 assertNull("The renamed grocery is not found", groceryFound);