diff --git a/config/secrets.yml b/config/secrets.yml index df71963..a09a127 100644 --- a/config/secrets.yml +++ b/config/secrets.yml @@ -12,6 +12,9 @@ development: test: <<: *default + admin: + username: test + password: test production: <<: *default diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fd42ff3..4bff140 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,5 +2,6 @@ end def login - @request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("oneocean:conserveworld") + credentials = Rails.application.secrets.admin + @request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64::encode64("#{credentials['username']}:#{credentials['password']}") end