diff options
author | Aaron Patterson <tenderlove@github.com> | 2018-09-25 09:27:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 09:27:37 -0700 |
commit | 6d698fdb070f4134c1795e8befb4e4c5e29a682f (patch) | |
tree | ccbaae1d82da6abfc99e151752a557a99da83dfc /actionview/test/actionpack/controller/layout_test.rb | |
parent | 4f12139a22f70ff0abc1709b8888011f8bfee42c (diff) | |
parent | 3301804ff6abcd5aae06cc5acbb82bc6a472f008 (diff) | |
download | rails-6d698fdb070f4134c1795e8befb4e4c5e29a682f.tar.gz rails-6d698fdb070f4134c1795e8befb4e4c5e29a682f.tar.bz2 rails-6d698fdb070f4134c1795e8befb4e4c5e29a682f.zip |
Merge pull request #33973 from rails/remove-catch-all
Remove deprecated catch-all route in the AV tests
Diffstat (limited to 'actionview/test/actionpack/controller/layout_test.rb')
-rw-r--r-- | actionview/test/actionpack/controller/layout_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/actionview/test/actionpack/controller/layout_test.rb b/actionview/test/actionpack/controller/layout_test.rb index ff66ff2a1a..6d5c97b7fd 100644 --- a/actionview/test/actionpack/controller/layout_test.rb +++ b/actionview/test/actionpack/controller/layout_test.rb @@ -48,6 +48,10 @@ end class LayoutAutoDiscoveryTest < ActionController::TestCase include TemplateHandlerHelper + with_routes do + get :hello, to: "views#hello" + end + def setup super @request.host = "www.nextangle.com" @@ -148,6 +152,11 @@ class LayoutSetInResponseTest < ActionController::TestCase include ActionView::Template::Handlers include TemplateHandlerHelper + with_routes do + get :hello, to: "views#hello" + get :hello, to: "views#goodbye" + end + def test_layout_set_when_using_default_layout @controller = DefaultLayoutController.new get :hello @@ -234,6 +243,10 @@ class SetsNonExistentLayoutFile < LayoutTest end class LayoutExceptionRaisedTest < ActionController::TestCase + with_routes do + get :hello, to: "views#hello" + end + def test_exception_raised_when_layout_file_not_found @controller = SetsNonExistentLayoutFile.new assert_raise(ActionView::MissingTemplate) { get :hello } @@ -247,6 +260,10 @@ class LayoutStatusIsRendered < LayoutTest end class LayoutStatusIsRenderedTest < ActionController::TestCase + with_routes do + get :hello, to: "views#hello" + end + def test_layout_status_is_rendered @controller = LayoutStatusIsRendered.new get :hello @@ -260,6 +277,10 @@ unless Gem.win_platform? end class LayoutSymlinkedIsRenderedTest < ActionController::TestCase + with_routes do + get :hello, to: "views#hello" + end + def test_symlinked_layout_is_rendered @controller = LayoutSymlinkedTest.new get :hello |