diff --git a/app/controllers/signup/base_controller.rb b/app/controllers/signup/base_controller.rb index 322cf2549..40ae83e92 100644 --- a/app/controllers/signup/base_controller.rb +++ b/app/controllers/signup/base_controller.rb @@ -2,9 +2,10 @@ class Signup::BaseController < ApplicationController require_untenanted_access before_action :redirect_if_local_auth + # TODO: Remove this auth before launch. http_basic_authenticate_with( - name: Rails.application.credentials.dig(:account_signup_http_basic_auth, :name), - password: Rails.application.credentials.dig(:account_signup_http_basic_auth, :password) + name: Rails.env.test? ? "testname" : Rails.application.credentials.account_signup_http_basic_auth.name, + password: Rails.env.test? ? "testpassword" : Rails.application.credentials.account_signup_http_basic_auth.password ) attr_reader :authenticated_identity diff --git a/test/controllers/signup/accounts_controller_test.rb b/test/controllers/signup/accounts_controller_test.rb index 270edab58..8c14e4326 100644 --- a/test/controllers/signup/accounts_controller_test.rb +++ b/test/controllers/signup/accounts_controller_test.rb @@ -81,12 +81,7 @@ class Signup::AccountsControllerTest < ActionDispatch::IntegrationTest private def auth_headers - { - "HTTP_AUTHORIZATION" => ActionController::HttpAuthentication::Basic.encode_credentials( - Rails.application.credentials.dig(:account_signup_http_basic_auth, :name), - Rails.application.credentials.dig(:account_signup_http_basic_auth, :password) - ) - } + { "HTTP_AUTHORIZATION" => ActionController::HttpAuthentication::Basic.encode_credentials("testname", "testpassword") } end def assert_authentication_requested_for(identity)