Skip to content

Commit

Permalink
Fix tests for Rails 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcolvar committed Aug 30, 2018
1 parent 8d9bebb commit a61dbfc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions spec/controllers/application_controller_spec.rb
Expand Up @@ -98,12 +98,12 @@ def show
render_views

it 'renders avalon layout' do
get :show, params: { id: 'abc1234' }
get :show, id: 'abc1234'
expect(response).to render_template("layouts/avalon")
end

it 'renders google analytics partial' do
get :show, params: { id: 'abc1234' }
get :show, id: 'abc1234'
expect(response).to render_template("modules/_google_analytics")
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/master_files_controller_spec.rb
Expand Up @@ -246,7 +246,7 @@ class << file
end

it "renders the Google Analytics partial" do
expect(get(:embed, params: { id: master_file.id })).to render_template('modules/_google_analytics')
expect(get(:embed, id: master_file.id )).to render_template('modules/_google_analytics')
end

context 'with fedora 3 pid' do
Expand Down
2 changes: 1 addition & 1 deletion spec/views/google_analytics_spec.rb
Expand Up @@ -19,7 +19,7 @@

it 'does not include GA code' do
render
expect(rendered).to have_none_of_selectors(:css, "script[src='https://www.googletagmanager.com/gtag/js?id=arandomid']", visible: false)
expect(rendered).not_to have_selector(:css, "script[src='https://www.googletagmanager.com/gtag/js?id=arandomid']", visible: false)
end
end
end

0 comments on commit a61dbfc

Please sign in to comment.