mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-26 04:21:36 +00:00
39 lines
681 B
Ruby
Executable file
39 lines
681 B
Ruby
Executable file
FactoryGirl.define do
|
|
factory :group do
|
|
sequence(:id) { |n| n + 100 } # Preserve first 100
|
|
sequence(:name) { |n| "Group#{n}" }
|
|
association :founder, factory: :user
|
|
|
|
initialize_with { Group.find_or_create_by_id(id) }
|
|
end
|
|
|
|
trait :admin do
|
|
name "Admins"
|
|
id Group::ADMINS
|
|
end
|
|
|
|
trait :caster do
|
|
name "Shoutcasters"
|
|
id Group::CASTERS
|
|
end
|
|
|
|
trait :champions do
|
|
name "Champions"
|
|
id Group::CHAMPIONS
|
|
end
|
|
|
|
trait :donors do
|
|
name "Donors"
|
|
id Group::DONORS
|
|
end
|
|
|
|
trait :gather_moderator do
|
|
name "Gather Moderator"
|
|
id Group::GATHER_MODERATORS
|
|
end
|
|
|
|
trait :ref do
|
|
name "Referees"
|
|
id Group::REFEREES
|
|
end
|
|
end
|