Files
growstuff/spec/views/layouts/application_spec.rb
Brenda Wallace aab2f75caa use console.log instead of alert
so our headless chrome doesn't get stuck on the alert
2019-06-25 15:15:16 +12:00

15 lines
392 B
Ruby

require 'rails_helper'
describe 'layouts/application.html.haml', type: "view" do
before do
controller.stub(:current_user) { nil }
end
it 'includes the analytics code' do
Rails.application.config.analytics_code = '<script>console.log("foo!");</script>'
render
assert_select "script", text: 'console.log("foo!");'
rendered.should_not have_content 'script'
end
end