diff --git a/config/initializers/new_framework_defaults_6_0.rb b/config/initializers/new_framework_defaults_6_0.rb index d5667abbf..38c836561 100644 --- a/config/initializers/new_framework_defaults_6_0.rb +++ b/config/initializers/new_framework_defaults_6_0.rb @@ -17,7 +17,7 @@ Rails.application.config.action_view.default_enforce_utf8 = false Rails.application.config.action_dispatch.use_cookies_with_metadata = true # Change the return value of `ActionDispatch::Response#content_type` to Content-Type header without modification. -# Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false +Rails.application.config.action_dispatch.return_only_media_type_on_content_type = false # Return false instead of self when enqueuing is aborted from a callback. # Rails.application.config.active_job.return_false_on_aborted_enqueue = true diff --git a/spec/controllers/instructeurs/procedures_controller_spec.rb b/spec/controllers/instructeurs/procedures_controller_spec.rb index d32d7dffa..7e5f2e561 100644 --- a/spec/controllers/instructeurs/procedures_controller_spec.rb +++ b/spec/controllers/instructeurs/procedures_controller_spec.rb @@ -540,8 +540,8 @@ describe Instructeurs::ProceduresController, type: :controller do format: :js end - it "responses in the correct format" do - expect(response.content_type).to eq "text/javascript" + it 'responds in the correct format' do + expect(response.media_type).to eq('text/javascript') expect(response).to have_http_status(:ok) end end diff --git a/spec/controllers/new_administrateur/attestation_templates_controller_spec.rb b/spec/controllers/new_administrateur/attestation_templates_controller_spec.rb index 83079adc6..4e50739e9 100644 --- a/spec/controllers/new_administrateur/attestation_templates_controller_spec.rb +++ b/spec/controllers/new_administrateur/attestation_templates_controller_spec.rb @@ -23,7 +23,7 @@ describe NewAdministrateur::AttestationTemplatesController, type: :controller do render_views it 'renders a PDF' do expect(subject.status).to eq(200) - expect(subject.content_type).to eq('application/pdf') + expect(subject.media_type).to eq('application/pdf') end end