diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 37b9bf8c0..36d492e0e 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -19,7 +19,7 @@ describe ApplicationController, type: :controller do let(:payload) { {} } before do - allow(@controller).to receive(:content_type).and_return('') + allow(@controller).to receive(:media_type).and_return('text/plain') allow(@controller).to receive(:current_user).and_return(current_user) expect(@controller).to receive(:current_instructeur).and_return(current_instructeur) expect(@controller).to receive(:current_administrateur).and_return(current_administrateur) @@ -41,7 +41,7 @@ describe ApplicationController, type: :controller do payload.delete(key) end expect(payload).to eq({ - sk_rendered_format: nil, + sk_rendered_format: :text, sk_variant: [], user_agent: 'Rails Testing', user_roles: 'Guest' @@ -62,7 +62,7 @@ describe ApplicationController, type: :controller do payload.delete(key) end expect(payload).to eq({ - sk_rendered_format: nil, + sk_rendered_format: :text, sk_variant: [], user_agent: 'Rails Testing', user_id: current_user.id, @@ -88,7 +88,7 @@ describe ApplicationController, type: :controller do payload.delete(key) end expect(payload).to eq({ - sk_rendered_format: nil, + sk_rendered_format: :text, sk_variant: [], user_agent: 'Rails Testing', user_id: current_user.id, diff --git a/spec/controllers/manager/application_controller_spec.rb b/spec/controllers/manager/application_controller_spec.rb index 45d8d995f..bfaf869c8 100644 --- a/spec/controllers/manager/application_controller_spec.rb +++ b/spec/controllers/manager/application_controller_spec.rb @@ -4,7 +4,7 @@ describe Manager::ApplicationController, type: :controller do let(:payload) { {} } before do - allow(@controller).to receive(:content_type).and_return('') + allow(@controller).to receive(:media_type).and_return('text/plain') allow(@controller).to receive(:current_user).and_return(current_user) @controller.send(:append_info_to_payload, payload) end @@ -14,7 +14,7 @@ describe Manager::ApplicationController, type: :controller do payload.delete(key) end expect(payload).to eq({ - sk_rendered_format: nil, + sk_rendered_format: :text, sk_variant: [], user_agent: 'Rails Testing', user_id: current_user.id,