Skip to content

Commit

Permalink
Make the user factory generate valid passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Feb 27, 2024
1 parent c014b39 commit 085d8eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/factories/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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.
Expand Down

0 comments on commit 085d8eb

Please sign in to comment.