mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-28 13:31:06 +00:00
Added necessary factory methods to test shoutbox
This commit is contained in:
parent
c075d4d805
commit
473d9ea15b
2 changed files with 21 additions and 0 deletions
|
@ -3,4 +3,12 @@ FactoryGirl.define do
|
||||||
sequence(:name) { |n| "Category #{n}" }
|
sequence(:name) { |n| "Category #{n}" }
|
||||||
sequence(:sort) { |n| n }
|
sequence(:sort) { |n| n }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
trait :news do
|
||||||
|
domain Category::DOMAIN_NEWS
|
||||||
|
end
|
||||||
|
|
||||||
|
trait :game do
|
||||||
|
domain Category::DOMAIN_GAMES
|
||||||
|
end
|
||||||
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