do not exceed 99 articles when ordering in specs
This commit is contained in:
parent
50f5064d8e
commit
0f01b87e3b
3 changed files with 8 additions and 4 deletions
|
|
@ -24,4 +24,8 @@ FactoryGirl.define do
|
|||
end
|
||||
end
|
||||
|
||||
# requires order and article
|
||||
factory :order_article do
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ FactoryGirl.define do
|
|||
|
||||
after :create do |supplier, evaluator|
|
||||
article_count = evaluator.article_count
|
||||
article_count = rand(1..100) if article_count == true
|
||||
article_count = rand(1..99) if article_count == true
|
||||
FactoryGirl.create_list :article, article_count, supplier: supplier
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue