Bring the final batch of factories from spree_core

This commit is contained in:
Luis Ramos
2020-08-23 14:50:09 +01:00
parent 2abbfad18c
commit 4048957e2e
7 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
FactoryBot.define do
factory :country, class: Spree::Country do
iso_name 'UNITED STATES'
name 'United States of America'
iso 'US'
iso3 'USA'
numcode 840
end
end

View File

@@ -0,0 +1,8 @@
FactoryBot.define do
factory :inventory_unit, class: Spree::InventoryUnit do
variant
order
state 'on_hand'
association(:shipment, factory: :shipment, state: 'pending')
end
end

View File

@@ -0,0 +1,6 @@
FactoryBot.define do
factory :product_option_type, class: Spree::ProductOptionType do
product
option_type
end
end

View File

@@ -0,0 +1,6 @@
FactoryBot.define do
factory :product_property, class: Spree::ProductProperty do
product
property
end
end

View File

@@ -0,0 +1,6 @@
FactoryBot.define do
factory :property, class: Spree::Property do
name 'baseball_cap_color'
presentation 'cap color'
end
end

View File

@@ -0,0 +1,7 @@
FactoryBot.define do
factory :tax_rate, class: Spree::TaxRate do
zone
amount 100.00
tax_category
end
end

View File

@@ -0,0 +1,6 @@
FactoryBot.define do
factory :zone, class: Spree::Zone do
name { generate(:random_string) }
description { generate(:random_string) }
end
end