diff options
4 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/api/v1/internals/compliance_check_sets_controller.rb b/app/controllers/api/v1/internals/compliance_check_sets_controller.rb index 08965989a..ccf1bcd2f 100644 --- a/app/controllers/api/v1/internals/compliance_check_sets_controller.rb +++ b/app/controllers/api/v1/internals/compliance_check_sets_controller.rb @@ -1,7 +1,7 @@ module Api module V1 module Internals - class ComplianceCheckSetsController < ApplicationController + class ComplianceCheckSetsController < Api::V1::Internals::ApplicationController include ControlFlow def validated @@ -20,7 +20,7 @@ module Api def notify_parent find_compliance_check_set check_parent - + if @compliance_check_set.notify_parent render json: { status: "ok", diff --git a/app/controllers/api/v1/internals/netex_imports_controller.rb b/app/controllers/api/v1/internals/netex_imports_controller.rb index 89bc1b81d..c8e33f7b8 100644 --- a/app/controllers/api/v1/internals/netex_imports_controller.rb +++ b/app/controllers/api/v1/internals/netex_imports_controller.rb @@ -1,7 +1,7 @@ module Api module V1 module Internals - class NetexImportsController < ApplicationController + class NetexImportsController < Api::V1::Internals::ApplicationController include ControlFlow def create diff --git a/spec/controllers/api/v1/internals/compliance_check_sets_controller_spec.rb b/spec/controllers/api/v1/internals/compliance_check_sets_controller_spec.rb index 90401611c..e73790384 100644 --- a/spec/controllers/api/v1/internals/compliance_check_sets_controller_spec.rb +++ b/spec/controllers/api/v1/internals/compliance_check_sets_controller_spec.rb @@ -9,7 +9,7 @@ RSpec.describe Api::V1::Internals::ComplianceCheckSetsController, type: :control include_context 'iboo wrong authorisation internal api' it 'should not be successful' do - get :notify_parent, id: check_set_1.id + get :notify_parent, id: check_set_1.id, format: :json expect(response).to have_http_status 401 end end @@ -20,7 +20,7 @@ RSpec.describe Api::V1::Internals::ComplianceCheckSetsController, type: :control describe "with existing record" do before(:each) do - get :notify_parent, id: check_set_2.id + get :notify_parent, id: check_set_2.id, format: :json end it 'should be successful' do @@ -43,7 +43,7 @@ RSpec.describe Api::V1::Internals::ComplianceCheckSetsController, type: :control describe "with non existing record" do it "should throw an error" do - get :notify_parent, id: 47 + get :notify_parent, id: 47, format: :json expect(response.body).to include("error") end end diff --git a/spec/controllers/api/v1/internals/netex_imports_controller_spec.rb b/spec/controllers/api/v1/internals/netex_imports_controller_spec.rb index 1fb898c06..ccdc258f4 100644 --- a/spec/controllers/api/v1/internals/netex_imports_controller_spec.rb +++ b/spec/controllers/api/v1/internals/netex_imports_controller_spec.rb @@ -7,7 +7,7 @@ RSpec.describe Api::V1::Internals::NetexImportsController, type: :controller do include_context 'iboo wrong authorisation internal api' it 'should not be successful' do - get :notify_parent, id: import_1.id + get :notify_parent, id: import_1.id, format: :json expect(response).to have_http_status 401 end end @@ -18,7 +18,7 @@ RSpec.describe Api::V1::Internals::NetexImportsController, type: :controller do describe "with existing record" do before(:each) do - get :notify_parent, id: import_2.id + get :notify_parent, id: import_2.id, format: :json end it 'should be successful' do @@ -32,7 +32,7 @@ RSpec.describe Api::V1::Internals::NetexImportsController, type: :controller do describe "with non existing record" do it "should throw an error" do - get :notify_parent, id: 47 + get :notify_parent, id: 47, format: :json expect(response.body).to include("error") end end |
