aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/test_case_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/template/test_case_test.rb')
-rw-r--r--actionpack/test/template/test_case_test.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/actionpack/test/template/test_case_test.rb b/actionpack/test/template/test_case_test.rb
index f2ed2ec609..c005f040eb 100644
--- a/actionpack/test/template/test_case_test.rb
+++ b/actionpack/test/template/test_case_test.rb
@@ -222,6 +222,25 @@ module ActionView
end
end
+ test "is able to use mounted routes" do
+ with_routing do |set|
+ app = Class.new do
+ def self.routes
+ @routes ||= ActionDispatch::Routing::RouteSet.new
+ end
+
+ routes.draw { get "bar", :to => lambda {} }
+
+ def self.call(*)
+ end
+ end
+
+ set.draw { mount app => "/foo", :as => "foo_app" }
+
+ assert_equal '/foo/bar', foo_app.bar_path
+ end
+ end
+
test "named routes can be used from helper included in view" do
with_routing do |set|
set.draw { resources :contents }