|
|
|
@ -20,13 +20,7 @@ RSpec.describe TagsController do
|
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns Vary header' do
|
|
|
|
|
expect(response.headers['Vary']).to eq 'Accept, Accept-Language, Cookie'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns public Cache-Control header' do
|
|
|
|
|
expect(response.headers['Cache-Control']).to include 'public'
|
|
|
|
|
end
|
|
|
|
|
it_behaves_like 'cacheable response', expects_vary: 'Accept, Accept-Language, Cookie'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
context 'when requested as JSON' do
|
|
|
|
@ -36,13 +30,7 @@ RSpec.describe TagsController do
|
|
|
|
|
expect(response).to have_http_status(200)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns Vary header' do
|
|
|
|
|
expect(response.headers['Vary']).to eq 'Accept, Accept-Language, Cookie'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns public Cache-Control header' do
|
|
|
|
|
expect(response.headers['Cache-Control']).to include 'public'
|
|
|
|
|
end
|
|
|
|
|
it_behaves_like 'cacheable response', expects_vary: 'Accept, Accept-Language, Cookie'
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|