diff --git a/app/controllers/repp/v1/registrar/accreditation_results_controller.rb b/app/controllers/repp/v1/registrar/accreditation_results_controller.rb index b0ed06c4c..32a3cd425 100644 --- a/app/controllers/repp/v1/registrar/accreditation_results_controller.rb +++ b/app/controllers/repp/v1/registrar/accreditation_results_controller.rb @@ -4,7 +4,7 @@ module Repp class AccreditationResultsController < ActionController::API before_action :authenticate_shared_key - TEMPARY_SECRET_KEY = 'tempary-secret-key'.freeze + TEMPORARY_SECRET_KEY = 'temporary-secret-key'.freeze api :POST, 'repp/v1/registrar/accreditation/push_results' desc 'added datetime results' @@ -35,7 +35,7 @@ module Repp end def authenticate_shared_key - api_key = "Basic #{TEMPARY_SECRET_KEY}" + api_key = "Basic #{TEMPORARY_SECRET_KEY}" render_failed unless api_key == request.authorization end diff --git a/test/integration/repp/v1/registrar/accreditation_results_test.rb b/test/integration/repp/v1/registrar/accreditation_results_test.rb index 8d2338ecf..11047f2c1 100644 --- a/test/integration/repp/v1/registrar/accreditation_results_test.rb +++ b/test/integration/repp/v1/registrar/accreditation_results_test.rb @@ -1,12 +1,12 @@ require 'test_helper' class ReppV1AccreditationResultsTest < ActionDispatch::IntegrationTest - TEMPARY_SECRET_KEY = 'tempary-secret-key'.freeze + TEMPORARY_SECRET_KEY = 'temporary-secret-key'.freeze def setup @user = users(:api_bestnames) - token = "Basic #{TEMPARY_SECRET_KEY}" + token = "Basic #{TEMPORARY_SECRET_KEY}" @auth_headers = { 'Authorization' => token } end @@ -25,7 +25,7 @@ class ReppV1AccreditationResultsTest < ActionDispatch::IntegrationTest def test_should_return_valid_response_invalid_authorization post '/repp/v1/registrar/accreditation/push_results', - headers: { 'Authorization' => 'Basic tempary-secret-ke'}, + headers: { 'Authorization' => 'Basic temporary-secret-ke'}, params: {accreditation_result: {username: @user.username, result: true} } json = JSON.parse(response.body, symbolize_names: true)