aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-07-25 02:47:21 +0000
committerRick Olson <technoweenie@gmail.com>2007-07-25 02:47:21 +0000
commitbdcbfa9944abae475236c1559403c533b82392ff (patch)
tree167791d184b0e14d850127d0a138bb5328b91da9 /actionpack/test
parent94e5b10aff8adbda671d5b63a8ad46b1e1263b18 (diff)
downloadrails-bdcbfa9944abae475236c1559403c533b82392ff.tar.gz
rails-bdcbfa9944abae475236c1559403c533b82392ff.tar.bz2
rails-bdcbfa9944abae475236c1559403c533b82392ff.zip
Allow you to set custom :conditions on resource routes. [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/resources_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/test/controller/resources_test.rb b/actionpack/test/controller/resources_test.rb
index 732f3e21da..c3e0836205 100644
--- a/actionpack/test/controller/resources_test.rb
+++ b/actionpack/test/controller/resources_test.rb
@@ -69,6 +69,12 @@ class ResourcesTest < Test::Unit::TestCase
end
end
+ def test_with_custom_conditions
+ with_restful_routing :messages, :conditions => { :subdomain => 'app' } do
+ assert_equal 'app', ActionController::Routing::Routes.named_routes.routes[:messages].conditions[:subdomain]
+ end
+ end
+
def test_irregular_id_with_no_requirements_should_raise_error
expected_options = {:controller => 'messages', :action => 'show', :id => '1.1.1'}