ensl.org/spec/factories/category.rb

19 lines
308 B
Ruby
Raw Normal View History

FactoryBot.define do
factory :category do
sequence(:name) { |n| "Category #{n}" }
sequence(:sort) { |n| n }
end
trait :news do
2020-03-17 01:03:02 +00:00
domain { Category::DOMAIN_NEWS }
end
trait :game do
2015-11-07 06:21:31 +00:00
domain Category::DOMAIN_GAMES
end
2020-03-22 12:22:10 +00:00
trait :forums do
domain Category::DOMAIN_FORUMS
end
2015-11-07 06:21:31 +00:00
end