do not exceed 99 articles when ordering in specs

This commit is contained in:
wvengen 2013-07-25 13:21:24 +02:00
parent 50f5064d8e
commit 0f01b87e3b
3 changed files with 8 additions and 4 deletions

View file

@ -24,4 +24,8 @@ FactoryGirl.define do
end
end
# requires order and article
factory :order_article do
end
end

View file

@ -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