0
0
Fork 0

Add role-specific user fabricators (#33437)

This commit is contained in:
Matt Jankowski 2025-01-03 03:28:14 -05:00 committed by GitHub
parent a8a16695f1
commit 7cbdcd7b3f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
105 changed files with 125 additions and 113 deletions

View file

@ -13,3 +13,15 @@ Fabricator(:user) do
current_sign_in_at { Time.zone.now }
agreement true
end
Fabricator(:admin_user, from: :user) do
role UserRole.find_by(name: 'Admin')
end
Fabricator(:moderator_user, from: :user) do
role UserRole.find_by(name: 'Moderator')
end
Fabricator(:owner_user, from: :user) do
role UserRole.find_by(name: 'Owner')
end