Commit e52c2490 authored by Rémy Coutable's avatar Rémy Coutable

Use 'media_type' instead of Rails 6.1 deprecated 'content_type'

This addresses the following Rails 6.1 deprecation notice:

DEPRECATION WARNING: Rails 6.1 will return Content-Type header without
modification. If you want just the MIME type, please use `#media_type`
instead.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f7bb57a2
...@@ -109,7 +109,7 @@ describe HelpController do ...@@ -109,7 +109,7 @@ describe HelpController do
it 'renders HTML' do it 'renders HTML' do
expect(response).to render_template('show.html.haml') expect(response).to render_template('show.html.haml')
expect(response.content_type).to eq 'text/html' expect(response.media_type).to eq 'text/html'
end end
end end
...@@ -130,7 +130,7 @@ describe HelpController do ...@@ -130,7 +130,7 @@ describe HelpController do
}, },
format: :png format: :png
expect(response).to be_successful expect(response).to be_successful
expect(response.content_type).to eq 'image/png' expect(response.media_type).to eq 'image/png'
expect(response.headers['Content-Disposition']).to match(/^inline;/) expect(response.headers['Content-Disposition']).to match(/^inline;/)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment