]> git.openstreetmap.org Git - rails.git/commitdiff
calculate hash once per test run, per thread
authorJosh Thompson <thompsonjoshd@gmail.com>
Fri, 19 Apr 2024 00:07:03 +0000 (18:07 -0600)
committerJosh Thompson <thompsonjoshd@gmail.com>
Fri, 19 Apr 2024 00:07:03 +0000 (18:07 -0600)
test/factories/user.rb

index 7823c0e9f6ca2e9345944d6a619756d1e68f3284..bc6cddf80225ca5fed39aed52148df98ec7f2b8a 100644 (file)
@@ -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.