14717: Fixups since tests now use config.yml
[arvados.git] / apps / workbench / test / controllers / healthcheck_controller_test.rb
index 45726e5a646f8aea9f7b8d855ab880cde1135d74..c3a0ddea906886e6b6e556cfb4a73375897d9c05 100644 (file)
@@ -16,7 +16,11 @@ class HealthcheckControllerTest < ActionController::TestCase
     [true, 'Bearer configuredmanagementtoken', 200, '{"health":"OK"}'],
   ].each do |enabled, header, error_code, error_msg|
     test "ping when #{if enabled then 'enabled' else 'disabled' end} with header '#{header}'" do
-      Rails.configuration.ManagementToken = 'configuredmanagementtoken' if enabled
+      if enabled
+        Rails.configuration.ManagementToken = 'configuredmanagementtoken'
+      else
+        Rails.configuration.ManagementToken = ""
+      end
 
       @request.headers['Authorization'] = header
       get :ping