Merge branch 'RecipeIngredientTest' into 'main'

Made tests for the RecipeIngredient class

Closes #20

See merge request cse1105/2025-2026/teams/csep-team-76!29
This commit is contained in:
Mei Chang van der Werff 2025-12-19 22:34:41 +01:00
commit c56344d88a
4 changed files with 98 additions and 4 deletions

View file

@ -134,8 +134,7 @@ public class IngredientController {
return ResponseEntity.notFound().build();
}
// TODO: Refactor to use setters
updated.id = id;
updated.setId(id);
Ingredient savedIngredient = ingredientRepository.save(updated);
messagingTemplate.convertAndSend(Topics.INGREDIENTS, new CreateIngredientMessage(savedIngredient));