use console.log instead of alert

so our headless chrome doesn't get stuck on the alert
This commit is contained in:
Brenda Wallace
2019-06-25 15:15:16 +12:00
parent 5150e8e2a7
commit aab2f75caa

View File

@@ -6,9 +6,9 @@ describe 'layouts/application.html.haml', type: "view" do
end
it 'includes the analytics code' do
Rails.application.config.analytics_code = '<script>alert("foo!")</script>'
Rails.application.config.analytics_code = '<script>console.log("foo!");</script>'
render
assert_select "script", text: 'alert("foo!")'
assert_select "script", text: 'console.log("foo!");'
rendered.should_not have_content 'script'
end
end