Files
growstuff/spec/factories/roles.rb
2022-11-06 16:34:36 +10:30

21 lines
451 B
Ruby

# frozen_string_literal: true
# Read about factories at https://github.com/thoughtbot/factory_bot
FactoryBot.define do
factory :role do
name { "Moderator" }
description { "These people moderate the forums" }
initialize_with { Role.find_or_create_by(name:) }
factory :admin do
name { "admin" }
end
factory :crop_wrangler do
name { "Crop Wrangler" }
description { "they wrangle crops" }
end
end
end