From: Josh Thompson Date: Fri, 19 Apr 2024 00:07:03 +0000 (-0600) Subject: calculate hash once per test run, per thread X-Git-Tag: live~137^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/130a2ed7c1d87845ebf0ed065200cec8a67fece4 calculate hash once per test run, per thread --- diff --git a/test/factories/user.rb b/test/factories/user.rb index 7823c0e9f..bc6cddf80 100644 --- a/test/factories/user.rb +++ b/test/factories/user.rb @@ -1,8 +1,10 @@ +pass_crypt = PasswordHash.create("test").first + FactoryBot.define do factory :user do sequence(:email) { |n| "user#{n}@example.com" } sequence(:display_name) { |n| "User #{n}" } - pass_crypt { "$argon2id$v=19$m=65536,t=3,p=4$M+oP6KQOdFLDeiYa/gbzAg$pULNwXgKt2sEmTxMXxt298skEqc8MjnPwGsk075jLrk" } + pass_crypt { pass_crypt } # These attributes are not the defaults, but in most tests we want # a 'normal' user who can log in without being redirected etc.