Add login & user tests
All checks were successful
CI / scan_ruby (push) Successful in 15s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 12s
CI / test (push) Successful in 35s

This commit is contained in:
sto
2025-03-27 10:26:03 +01:00
parent 7023600cd1
commit 26b8064553
7 changed files with 123 additions and 8 deletions

View File

@@ -0,0 +1,5 @@
FactoryBot.define do
factory :contest do
name { Faker::Company.unique.name }
end
end

View File

@@ -1,7 +1,11 @@
FactoryBot.define do
factory :user do
username { Faker::Internet.username }
email_address { Faker::Internet.email }
password { Faker::Internet.password(min_length: 12, max_length: 18) }
username { Faker::Internet.unique.username }
email_address { Faker::Internet.unique.email }
password { Faker::Internet.unique.password(min_length: 12, max_length: 18) }
end
trait :admin do
admin { true }
end
end