Rename and fix simple_product to base_product

This factory has been merged into the base_product factory. Besides,
products no longer have on_hand attribute.
This commit is contained in:
Pau Perez
2018-04-30 13:49:52 +02:00
parent e7b1d933f4
commit c3132e87d6
2 changed files with 2 additions and 3 deletions

View File

@@ -246,7 +246,6 @@ Spree::Product.class_eval do
variant = self.master.dup
variant.product = self
variant.is_master = false
variant.on_demand = self.on_demand
self.variants << variant
end
end

View File

@@ -460,7 +460,8 @@ FactoryGirl.modify do
factory :product do
primary_taxon { Spree::Taxon.first || FactoryGirl.create(:taxon) }
end
factory :simple_product do
factory :base_product do
# Fix product factory name sequence with Kernel.rand so it is not interpreted as a Spree::Product method
# Pull request: https://github.com/spree/spree/pull/1964
# When this fix has been merged into a version of Spree that we're using, this line can be removed.
@@ -468,7 +469,6 @@ FactoryGirl.modify do
supplier { Enterprise.is_primary_producer.first || FactoryGirl.create(:supplier_enterprise) }
primary_taxon { Spree::Taxon.first || FactoryGirl.create(:taxon) }
on_hand 3
unit_value 1
unit_description ''