Skip to content

Commit

Permalink
Assert template snippets don't get layout
Browse files Browse the repository at this point in the history
  • Loading branch information
alext committed Sep 20, 2013
1 parent 2995833 commit c92bb1a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/integration/templates/non_layout_templates_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require_relative "../../integration_test_helper"

class NonLayoutTemplatesTest < ActionDispatch::IntegrationTest
def template_file(name)
Rails.root.join("app", "views", "root", "#{name}.html.erb")
end

%w(
beta_notice
campaign
proposition_menu
related.raw
report_a_problem.raw
).each do |template|
should "not add a layout to the #{template} snippet" do
get "/templates/#{template}.html.erb"

refute_match '<html', last_response.body
end
end
end

0 comments on commit c92bb1a

Please sign in to comment.