]> git.openstreetmap.org Git - rails.git/blobdiff - test/factories/user.rb
Merge remote-tracking branch 'upstream/pull/4708'
[rails.git] / test / factories / user.rb
index 5b92345c2dbcf0f356be857b7432018dec6abef5..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 { PasswordHash.create("test").first }
+    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.