diff --git a/src/main/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductController.java b/src/main/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductController.java index ce11ea30fa49c8725f8e6fb3a2eebc897b619dd2..c312bc99d31aa9b92737c6da9a4a9babeb00c9bc 100644 --- a/src/main/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductController.java +++ b/src/main/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductController.java @@ -89,7 +89,7 @@ public class ProductController { } boolean vegan = CategoryUtil.isVegan(product.getName(),product.getDescription()); if(!vegan){ - Allergy allergy = allergyService.getAllergyByName("ikke vegansk").get(); + Allergy allergy = allergyService.getAllergyByName("Ikke vegansk").get(); product.addAllergy(allergy); allergy.addProduct(product); allergy = allergyService.getAllergyByName("Ikke vegetariansk").get(); @@ -98,7 +98,7 @@ public class ProductController { } boolean vegetarian = CategoryUtil.isVegetarian(product.getName(),product.getDescription(),vegan); if(!vegetarian){ - Allergy allergy = allergyService.getAllergyByName("ikke vegetariansk").get(); + Allergy allergy = allergyService.getAllergyByName("Ikke vegetariansk").get(); product.addAllergy(allergy); allergy.addProduct(product); } diff --git a/src/test/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductControllerTest.java b/src/test/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductControllerTest.java index bbd03eb12bdddbc1d8ab558d5812e2b8965c5f9c..6117c51a1c61a97a49b4160ef8f38317cacd828c 100644 --- a/src/test/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductControllerTest.java +++ b/src/test/java/ntnu/idatt2016/v233/SmartMat/controller/product/ProductControllerTest.java @@ -3,6 +3,7 @@ package ntnu.idatt2016.v233.SmartMat.controller.product; import ntnu.idatt2016.v233.SmartMat.dto.request.ProductRequest; import ntnu.idatt2016.v233.SmartMat.entity.product.Category; import ntnu.idatt2016.v233.SmartMat.entity.product.Product; +import ntnu.idatt2016.v233.SmartMat.service.AllergyService; import ntnu.idatt2016.v233.SmartMat.service.product.CategoryService; import ntnu.idatt2016.v233.SmartMat.service.product.ProductService; import org.junit.jupiter.api.Test;