17 lines
386 B
Ruby
17 lines
386 B
Ruby
FactoryBot.define do
|
|
factory :order do
|
|
association :list
|
|
association :user
|
|
association :supplier #TODO warning! this may create a different supplier than the one created by the associated table
|
|
trait :placed do
|
|
state { 'placed' }
|
|
end
|
|
trait :active do
|
|
state { 'active' }
|
|
end
|
|
trait :cancelled do
|
|
state { 'cancelled' }
|
|
end
|
|
end
|
|
end
|