aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/template/test_case_test.rb
diff options
context:
space:
mode:
authorAaron Patterson <tenderlove@github.com>2018-09-25 09:27:37 -0700
committerGitHub <noreply@github.com>2018-09-25 09:27:37 -0700
commit6d698fdb070f4134c1795e8befb4e4c5e29a682f (patch)
treeccbaae1d82da6abfc99e151752a557a99da83dfc /actionview/test/template/test_case_test.rb
parent4f12139a22f70ff0abc1709b8888011f8bfee42c (diff)
parent3301804ff6abcd5aae06cc5acbb82bc6a472f008 (diff)
downloadrails-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/template/test_case_test.rb')
-rw-r--r--actionview/test/template/test_case_test.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb
index d98fd4f9a2..27f5a7cc3e 100644
--- a/actionview/test/template/test_case_test.rb
+++ b/actionview/test/template/test_case_test.rb
@@ -217,8 +217,14 @@ module ActionView
test "is able to use routes" do
controller.request.assign_parameters(@routes, "foo", "index", {}, "/foo", [])
- assert_equal "/foo", url_for
- assert_equal "/bar", url_for(controller: "bar")
+ with_routing do |set|
+ set.draw {
+ get :foo, to: "foo#index"
+ get :bar, to: "bar#index"
+ }
+ assert_equal "/foo", url_for
+ assert_equal "/bar", url_for(controller: "bar")
+ end
end
test "is able to use named routes" do
@@ -244,6 +250,8 @@ module ActionView
set.draw { mount app => "/foo", :as => "foo_app" }
+ singleton_class.include set.mounted_helpers
+
assert_equal "/foo/bar", foo_app.bar_path
end
end