uses FactoryGirl helpers
This commit is contained in:
parent
1cf2145ff6
commit
f462e70e49
17 changed files with 65 additions and 63 deletions
|
|
@ -4,7 +4,7 @@ FactoryGirl.define do
|
|||
|
||||
factory :order do
|
||||
starts { Time.now }
|
||||
supplier { FactoryGirl.create :supplier, article_count: (article_count.nil? ? true : article_count) }
|
||||
supplier { create :supplier, article_count: (article_count.nil? ? true : article_count) }
|
||||
article_ids { supplier.articles.map(&:id) unless supplier.nil? }
|
||||
|
||||
ignore do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue