Permalink
Browse files

Testcase for GH #5114.

  • Loading branch information...
1 parent 67a5157 commit f5e69fc7dbe5575d35bb4d2293a79763bb3f639b @kennyj committed Feb 21, 2012
Showing with 26 additions and 0 deletions.
  1. +26 −0 actionpack/test/dispatch/routing_test.rb
View
26 actionpack/test/dispatch/routing_test.rb
@@ -2402,3 +2402,29 @@ def app; Routes end
end
+class TestTildeAndMinusPaths < ActionDispatch::IntegrationTest
+ Routes = ActionDispatch::Routing::RouteSet.new.tap do |app|
+ app.draw do
+ match "/~user" => lambda { |env|
+ [200, { 'Content-Type' => 'text/plain' }, []]
+ }, :as => :tilde_path
+ match "/young-and-fine" => lambda { |env|
+ [200, { 'Content-Type' => 'text/plain' }, []]
+ }, :as => :tilde_path
+ end
+ end
+
+ include Routes.url_helpers
+ def app; Routes end
+
+ test 'recognizes tilde path' do
+ get "/~user"
+ assert_equal "200", @response.code
+ end
+
+ test 'recognizes minus path' do
+ get "/young-and-fine"
+ assert_equal "200", @response.code
+ end
+
+end

0 comments on commit f5e69fc

Please sign in to comment.