continuing the refactor of the admin section
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
FactoryGirl.define do
|
||||
factory :list do
|
||||
association :table
|
||||
association :supplier
|
||||
association :supplier #TODO warning! this may create a different supplier than the one created by the associated table
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
FactoryGirl.define do
|
||||
factory :product_category do
|
||||
sequence(:name){|i| "ProductCategory#{i}"}
|
||||
sequence(:position){|i| i}
|
||||
association :supplier
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,6 @@
|
||||
FactoryGirl.define do
|
||||
factory :product do
|
||||
sequence(:name){|i| "Product#{i}"}
|
||||
price 34.95
|
||||
association :supplier
|
||||
end
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
FactoryGirl.define do
|
||||
factory :section do
|
||||
sequence(:title){|i| "Section #{i} title"}
|
||||
association :supplier
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user