Added necessary factory methods to test shoutbox

This commit is contained in:
cblanc 2015-05-09 16:21:18 +01:00
parent 7bbb6441a9
commit 4af7325620
2 changed files with 21 additions and 0 deletions

View file

@ -3,4 +3,12 @@ FactoryGirl.define do
sequence(:name) { |n| "Category #{n}" }
sequence(:sort) { |n| n }
end
trait :news do
domain Category::DOMAIN_NEWS
end
trait :game do
domain Category::DOMAIN_GAMES
end
end

13
spec/factories/gather.rb Normal file
View file

@ -0,0 +1,13 @@
FactoryGirl.define do
factory :gather do
association :category, factory: [:category, :game]
end
trait :running do
status Gather::STATE_RUNNING
end
trait :picking do
status Gather::STATE_PICKING
end
end