aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorDamien Mathieu <42@dmathieu.com>2011-06-01 15:50:49 +0200
committerDamien Mathieu <42@dmathieu.com>2011-06-01 15:51:36 +0200
commit8a0ffa7c9521c6c8d4298422ae1504d9d839987e (patch)
tree2bae60caa1fd041e5c58325cdca5573ad49114d4 /actionpack/test
parent1ff4bfc147d301d37fe3f9c5f1d081dcd16ec35d (diff)
downloadrails-8a0ffa7c9521c6c8d4298422ae1504d9d839987e.tar.gz
rails-8a0ffa7c9521c6c8d4298422ae1504d9d839987e.tar.bz2
rails-8a0ffa7c9521c6c8d4298422ae1504d9d839987e.zip
fix creating an empty route on 1.8. Closes #1210
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/integration_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 01dc2f2091..23709e44e2 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -492,6 +492,8 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
end
routes.draw do
+ match '', :to => 'application_integration_test/test#index', :as => :empty_string
+
match 'foo', :to => 'application_integration_test/test#index', :as => :foo
match 'bar', :to => 'application_integration_test/test#index', :as => :bar
end
@@ -501,11 +503,15 @@ class ApplicationIntegrationTest < ActionDispatch::IntegrationTest
end
test "includes route helpers" do
+ assert_equal '/', empty_string_path
assert_equal '/foo', foo_path
assert_equal '/bar', bar_path
end
test "route helpers after controller access" do
+ get '/'
+ assert_equal '/', empty_string_path
+
get '/foo'
assert_equal '/foo', foo_path