diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-03-08 12:56:41 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-03-08 12:56:41 +0000 |
commit | cff3ecc2aef098fa1a0158f3d0fc01de37774e2d (patch) | |
tree | 889615b2577757750ea86e7e5d22afb9e6b87bd1 /actionpack/test | |
parent | e91d7ed53ded1d0b6ac7f52df6543f46ec4b6d97 (diff) | |
download | rails-cff3ecc2aef098fa1a0158f3d0fc01de37774e2d.tar.gz rails-cff3ecc2aef098fa1a0158f3d0fc01de37774e2d.tar.bz2 rails-cff3ecc2aef098fa1a0158f3d0fc01de37774e2d.zip |
Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [alloy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/test_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 7755fb7405..04cc2a20d8 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -653,3 +653,14 @@ class CrazyNameTest < ActionController::TestCase assert_equal ContentController, self.class.controller_class end end + +class NamedRoutesControllerTest < ActionController::TestCase + tests ContentController + + def test_should_be_able_to_use_named_routes_before_a_request_is_done + with_routing do |set| + set.draw { |map| map.resources :contents } + assert_equal 'http://test.host/contents/new', new_content_url + end + end +end |