ensl.org/spec/factories/group.rb

28 lines
480 B
Ruby
Raw Normal View History

2015-05-14 16:27:12 +00:00
FactoryGirl.define do
factory :group do
sequence(:id) { |n| n + 100 } # Preserve first 100
sequence(:name) { |n| "Group#{n}" }
association :founder, factory: :user
end
trait :admin do
name "Admins"
id Group::ADMINS
end
2015-08-15 12:25:44 +00:00
trait :champions do
name "Champions"
id Group::CHAMPIONS
end
trait :donors do
name "Donors"
id Group::DONORS
end
2015-10-20 17:04:50 +00:00
trait :gather_moderator do
name "Gather Moderator"
id Group::GATHER_MODERATORS
end
2015-05-14 16:27:12 +00:00
end