diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-22 09:55:26 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-22 09:55:26 -0800 |
commit | ef5670effd0088d147de5706078ba473d0d23c77 (patch) | |
tree | c43df4a8dd0ff8608c5cba13e7827b7b0e50a712 /actionpack | |
parent | 7f2548e34d79c47ca138ca0378f4a06390c407f1 (diff) | |
parent | f5e69fc7dbe5575d35bb4d2293a79763bb3f639b (diff) | |
download | rails-ef5670effd0088d147de5706078ba473d0d23c77.tar.gz rails-ef5670effd0088d147de5706078ba473d0d23c77.tar.bz2 rails-ef5670effd0088d147de5706078ba473d0d23c77.zip |
Merge pull request #5119 from kennyj/fix_5114
Testcase for GH #5114.
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 563c6efe0d..e8da790e50 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2402,3 +2402,29 @@ class TestMultipleNestedController < ActionDispatch::IntegrationTest 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 |