From 2e6b54a9c7dcfb3bcf127fc38553ed1a58ebd064 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Wed, 6 Dec 2017 00:31:34 +0100 Subject: - Change inheritance naming in api/v1 controllers => it generated errors - add format: :json in controller specs --- .../api/v1/internals/compliance_check_sets_controller_spec.rb | 6 +++--- spec/controllers/api/v1/internals/netex_imports_controller_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'spec/controllers/api/v1') 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 -- cgit v1.2.3