0
0
Fork 0
mirror of https://github.com/ENSL/ensl.org.git synced 2025-01-19 16:01:26 +00:00
ensl.org/spec/factories/group.rb
2015-08-15 13:25:44 +01:00

22 lines
384 B
Ruby

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
trait :champions do
name "Champions"
id Group::CHAMPIONS
end
trait :donors do
name "Donors"
id Group::DONORS
end
end