aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/new_base
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-12-08 20:59:43 +0100
committerJosé Valim <jose.valim@gmail.com>2011-12-08 21:00:34 +0100
commitebd71fd0e39abf495bdf64e3e6d278340c17e5ea (patch)
treecc770d6fe1f79c77bdd64134bf672ab5d56cf2b6 /actionpack/test/controller/new_base
parent94dcbe8115810b4545ca8011e6c1e5386cb1c842 (diff)
downloadrails-ebd71fd0e39abf495bdf64e3e6d278340c17e5ea.tar.gz
rails-ebd71fd0e39abf495bdf64e3e6d278340c17e5ea.tar.bz2
rails-ebd71fd0e39abf495bdf64e3e6d278340c17e5ea.zip
Fix a regression and also fix broken test.
Diffstat (limited to 'actionpack/test/controller/new_base')
-rw-r--r--actionpack/test/controller/new_base/render_layout_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/test/controller/new_base/render_layout_test.rb b/actionpack/test/controller/new_base/render_layout_test.rb
index d3dcb5cad6..73c2d8244a 100644
--- a/actionpack/test/controller/new_base/render_layout_test.rb
+++ b/actionpack/test/controller/new_base/render_layout_test.rb
@@ -71,7 +71,8 @@ module ControllerLayouts
self.view_paths = [ActionView::FixtureResolver.new(
"layouts/application.html.erb" => "<html><%= yield %></html>",
"controller_layouts/mismatch_format/index.xml.builder" => "xml.instruct!",
- "controller_layouts/mismatch_format/implicit.builder" => "xml.instruct!"
+ "controller_layouts/mismatch_format/implicit.builder" => "xml.instruct!",
+ "controller_layouts/mismatch_format/explicit.js.erb" => "alert('foo');"
)]
def explicit
@@ -94,10 +95,9 @@ module ControllerLayouts
assert_response XML_INSTRUCT
end
- test "if an HTML template is explicitly provides for a JS template, an error is raised" do
- assert_raises ActionView::MissingTemplate do
- get :explicit, {}, "action_dispatch.show_exceptions" => false
- end
+ test "a layout for JS is ignored even if explicitly provided for HTML" do
+ get :explicit, { :format => "js" }
+ assert_response "alert('foo');"
end
end
end