mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-15 09:21:25 +00:00
Added necessary factory methods to test shoutbox
This commit is contained in:
parent
5a684b4300
commit
ebc371a182
2 changed files with 21 additions and 0 deletions
|
@ -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
13
spec/factories/gather.rb
Normal 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
|
Loading…
Reference in a new issue