aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/api
diff options
context:
space:
mode:
authorcedricnjanga2017-12-06 00:31:34 +0100
committercedricnjanga2017-12-06 00:31:34 +0100
commit2e6b54a9c7dcfb3bcf127fc38553ed1a58ebd064 (patch)
tree625c3dacdd3f84d09dc47b974d9e04f5bddca81c /spec/controllers/api
parent00fa87ab96185bbcdc1ce2f1d19230e5a1dcc77f (diff)
downloadchouette-core-2e6b54a9c7dcfb3bcf127fc38553ed1a58ebd064.tar.bz2
- Change inheritance naming in api/v1 controllers => it generated errors
- add format: :json in controller specs
Diffstat (limited to 'spec/controllers/api')
-rw-r--r--spec/controllers/api/v1/internals/compliance_check_sets_controller_spec.rb6
-rw-r--r--spec/controllers/api/v1/internals/netex_imports_controller_spec.rb6
2 files changed, 6 insertions, 6 deletions
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