Add tests to user model and admin panel requests

This commit is contained in:
riggraz
2019-08-23 15:58:43 +02:00
parent 33ba4771d7
commit 75893bc4fd
6 changed files with 100 additions and 6 deletions

View File

@@ -5,4 +5,20 @@ FactoryBot.define do
full_name { "First Last" }
password { "password" }
end
factory :moderator, class: User do
sequence(:email) { |n| "mod#{n}@example.com" }
full_name { "First Last" }
password { "password" }
role { "moderator" }
end
factory :admin, class: User do
sequence(:email) { |n| "admin#{n}@example.com" }
full_name { "First Last" }
password { "password" }
role { "admin" }
end
end