From f6877687c6d1af0a5902516fe721ba3e34b5b5de Mon Sep 17 00:00:00 2001 From: nochill Date: Wed, 22 Mar 2023 15:14:28 +0700 Subject: [PATCH] add product type id --- api/product_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/product_test.go b/api/product_test.go index ad452db..50d9f0d 100644 --- a/api/product_test.go +++ b/api/product_test.go @@ -170,6 +170,7 @@ func TestCreateProductApi(t *testing.T) { "name": product.Name, "selling_price": product.SellingPrice, "purchase_price": product.PurchasePrice, + "product_type_id": product.ProductTypeID, "product_category_id": product.ProductCategoryID, "stock": product.Stock, }, @@ -177,6 +178,7 @@ func TestCreateProductApi(t *testing.T) { arg := db.CreateProductParams{ MerchantID: product.MerchantID, Name: product.Name, + ProductTypeID: product.ProductTypeID, SellingPrice: product.SellingPrice, PurchasePrice: product.PurchasePrice, ProductCategoryID: product.ProductCategoryID, @@ -230,6 +232,7 @@ func randomProduct(merchantID string) db.Product { return db.Product{ ID: uuid.New(), MerchantID: uuid.MustParse(MERCHANTID), + ProductTypeID: 1, Name: util.RandomString(5), SellingPrice: util.RandomFloat(1000, 99999), PurchasePrice: util.RandomFloat(999, 9999),