From 09d3d284ee36f9a916fbd4ba88f87e554455fa49 Mon Sep 17 00:00:00 2001
From: Pedro Cardona <pedropca@stud.ntnu.no>
Date: Fri, 21 Apr 2023 09:43:00 +0200
Subject: [PATCH] Tests related to category were fixed.

---
 .../ntnu/idatt2016/v233/SmartMat/entity/product/Category.java | 2 +-
 .../v233/SmartMat/repository/ProductRepositoryTest.java       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/ntnu/idatt2016/v233/SmartMat/entity/product/Category.java b/src/main/java/ntnu/idatt2016/v233/SmartMat/entity/product/Category.java
index ce588654..8ff16efa 100644
--- a/src/main/java/ntnu/idatt2016/v233/SmartMat/entity/product/Category.java
+++ b/src/main/java/ntnu/idatt2016/v233/SmartMat/entity/product/Category.java
@@ -16,7 +16,7 @@ import lombok.NoArgsConstructor;
 public class Category {
     @Id
     @Column(name = "category_name")
-    String ean;
+    String categoryName;
     @Column(name = "category_description")
     String description;
 }
\ No newline at end of file
diff --git a/src/test/java/ntnu/idatt2016/v233/SmartMat/repository/ProductRepositoryTest.java b/src/test/java/ntnu/idatt2016/v233/SmartMat/repository/ProductRepositoryTest.java
index 86a120ff..f5073198 100644
--- a/src/test/java/ntnu/idatt2016/v233/SmartMat/repository/ProductRepositoryTest.java
+++ b/src/test/java/ntnu/idatt2016/v233/SmartMat/repository/ProductRepositoryTest.java
@@ -34,7 +34,7 @@ public class ProductRepositoryTest {
                 .ean(1234567890123L)
                 .name("Test Product")
                 .description("This is a test product")
-                .category_name("TestCategory")
+                .categoryName("TestCategory")
                 .build();
         entityManager.persist(product);
     }
@@ -69,7 +69,7 @@ public class ProductRepositoryTest {
                 .ean(1234567890124L)
                 .name("New Product")
                 .description("This is a new product")
-                .category_name("TestCategory")
+                .categoryName("TestCategory")
                 .build();
         productRepository.save(newProduct);
         List<Product> products = productRepository.findAll();
-- 
GitLab