]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4714'
authorTom Hughes <tom@compton.nu>
Sun, 21 Apr 2024 17:59:32 +0000 (18:59 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 21 Apr 2024 17:59:32 +0000 (18:59 +0100)
config/environments/test.rb
test/factories/user.rb

index 80871151fa501761b7a6e6e938a5fc38f3f88653..506ccf6433519cba3ba79a173e26a0985dc28b15 100644 (file)
@@ -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
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.