aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/mount_test.rb
diff options
context:
space:
mode:
authorLarry Lv <larrylv1990@gmail.com>2014-06-12 14:15:29 +0800
committerLarry Lv <larrylv1990@gmail.com>2014-06-14 04:57:33 +0800
commit4a9d4c85c3ad188d188104a7154d916aab079146 (patch)
tree02591eb70b9b73f481f2288cef004a6f3fb544b1 /actionpack/test/dispatch/mount_test.rb
parentb0f07abbe385463cb03cfc890b85bb8ce3d5ccef (diff)
downloadrails-4a9d4c85c3ad188d188104a7154d916aab079146.tar.gz
rails-4a9d4c85c3ad188d188104a7154d916aab079146.tar.bz2
rails-4a9d4c85c3ad188d188104a7154d916aab079146.zip
Fix request's path_info when a rack app mounted at '/'.
Fixes issue #15511.
Diffstat (limited to 'actionpack/test/dispatch/mount_test.rb')
-rw-r--r--actionpack/test/dispatch/mount_test.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/mount_test.rb b/actionpack/test/dispatch/mount_test.rb
index cdf00d84fb..bd3f6274de 100644
--- a/actionpack/test/dispatch/mount_test.rb
+++ b/actionpack/test/dispatch/mount_test.rb
@@ -31,6 +31,8 @@ class TestRoutingMount < ActionDispatch::IntegrationTest
resources :users do
mount FakeEngine, :at => "/fakeengine", :as => :fake_mounted_at_resource
end
+
+ mount SprocketsApp, :at => "/", :via => :get
end
def app
@@ -44,6 +46,11 @@ class TestRoutingMount < ActionDispatch::IntegrationTest
"A named route should be defined with a parent's prefix"
end
+ def test_mounting_at_root_path
+ get "/omg"
+ assert_equal " -- /omg", response.body
+ end
+
def test_mounting_sets_script_name
get "/sprockets/omg"
assert_equal "/sprockets -- /omg", response.body