Rails6でContent-Typeのtestを書きたいっ!
2023年10月30日
何かいい感じのMatcherがあるんかな?と思ったけど、.content_typeでheadersからContent-Type取れるんですね👍
describe 'index' do
subject { get :index }
it 'pdf' do
expect(subject.content_type).to eq "application/pdf"
end
end
何かいい感じのMatcherがあるんかな?と思ったけど、.content_typeでheadersからContent-Type取れるんですね👍
describe 'index' do
subject { get :index }
it 'pdf' do
expect(subject.content_type).to eq "application/pdf"
end
end