Make the user factory generate valid passwords
This commit is contained in:
parent
c014b39175
commit
085d8ebe6a
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,7 @@ FactoryBot.define do
|
|||
factory :user do
|
||||
sequence(:email) { |n| "user#{n}@example.com" }
|
||||
sequence(:display_name) { |n| "User #{n}" }
|
||||
pass_crypt { Digest::MD5.hexdigest("test") }
|
||||
pass_crypt { PasswordHash.create("test").first }
|
||||
|
||||
# These attributes are not the defaults, but in most tests we want
|
||||
# a 'normal' user who can log in without being redirected etc.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue