Files
growstuff/spec/views/layouts/application_spec.rb
2018-01-03 17:12:17 +13:00

15 lines
385 B
Ruby

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