From: Tom Hughes Date: Sun, 21 Apr 2024 17:54:16 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/4708' X-Git-Tag: live~1127 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/43db18ae911fef3ad7b36e9ed27e5eff469ef863?hp=29020530a8fabe1d02e3bc9c41970c9030efc380 Merge remote-tracking branch 'upstream/pull/4708' --- diff --git a/config/environments/test.rb b/config/environments/test.rb index 80871151f..506ccf643 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -11,6 +11,9 @@ Rails.application.configure do # While tests run files are not watched, reloading is not necessary. config.enable_reloading = false + # disable logging in tests, for speed increases. Set to :info to bring back logging + config.log_level = :warn + # Eager loading loads your entire application. When running a single test locally, # this is usually not necessary, and can slow down your test suite. However, it's # recommended that you enable it in continuous integration systems to ensure eager diff --git a/test/factories/user.rb b/test/factories/user.rb index 5b92345c2..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 { 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.