12968: fix existing specs

- As per the new changes, unit_type change will create a new product rather than give errors.
- on bulk-update screen as well, two products can have same name with different unit_type
This commit is contained in:
Ahmed Ejaz
2024-11-25 17:29:27 +05:00
parent 3a3d729dcb
commit 3d09ac01cc

View File

@@ -578,11 +578,11 @@ RSpec.describe ProductImport::ProductImporter do
describe "updating non-updatable fields on existing variants" do
let(:csv_data) {
CSV.generate do |csv|
csv << ["name", "producer", "category", "on_hand", "price", "units", "unit_type",
csv << ["name", "producer", "category", "on_hand", "price", "units", "variant_unit_name",
"shipping_category"]
csv << ["Beetroot", enterprise3.name, "Vegetables", "5", "3.50", "500", "Kg",
csv << ["Beetroot", enterprise3.name, "Vegetables", "5", "3.50", "500", "Half",
shipping_category.name]
csv << ["Tomato", enterprise3.name, "Vegetables", "6", "5.50", "500", "Kg",
csv << ["Tomato", enterprise3.name, "Vegetables", "6", "5.50", "500", "Half",
shipping_category.name]
end
}