X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/085d8ebe6a6cfd490d52de959b14c1b2bd7da6f6..4d6df34c4bca932b75f2260fe533b4d22c3651f9:/test/factories/user.rb?ds=inline diff --git a/test/factories/user.rb b/test/factories/user.rb index 5b92345c2..7f1f14e9c 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 { 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.