Rubocop spec/controllers/widget_controller_spec.rb
This commit is contained in:
parent
fa0acf9791
commit
ba7dfa5c21
2 changed files with 13 additions and 14 deletions
|
@ -634,7 +634,6 @@ AllCops:
|
|||
- 'spec/controllers/campaigns_spec.rb'
|
||||
- 'spec/controllers/roles_spec.rb'
|
||||
- 'spec/controllers/direct_debit_details_spec.rb'
|
||||
- 'spec/controllers/widget_controller_spec.rb'
|
||||
- 'spec/controllers/emails_spec.rb'
|
||||
- 'spec/controllers/ticket_levels_spec.rb'
|
||||
- 'spec/controllers/concerns/supporter/current_spec.rb'
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
require 'rails_helper'
|
||||
|
||||
RSpec.describe WidgetController, type: :controller do
|
||||
describe 'v2' do
|
||||
it 'accepts requests without a CORS error' do
|
||||
expect {get :v2, format: :js }.to_not raise_error
|
||||
end
|
||||
describe 'v2' do
|
||||
it 'accepts requests without a CORS error' do
|
||||
expect { get :v2, format: :js }.to_not raise_error
|
||||
end
|
||||
|
||||
it 'has a cache-control header of 10 minutes' do
|
||||
get :v2, format: :js
|
||||
expect(response.headers["Cache-Control"]).to include "max-age=600"
|
||||
end
|
||||
it 'has a cache-control header of 10 minutes' do
|
||||
get :v2, format: :js
|
||||
expect(response.headers['Cache-Control']).to include 'max-age=600'
|
||||
end
|
||||
|
||||
it 'does redirect' do
|
||||
get :v2, format: :js
|
||||
expect(response.headers.has_key?("Location")).to eq true
|
||||
end
|
||||
end
|
||||
it 'does redirect' do
|
||||
get :v2, format: :js
|
||||
expect(response.headers.has_key?('Location')).to eq true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue