From bdcbfa9944abae475236c1559403c533b82392ff Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Wed, 25 Jul 2007 02:47:21 +0000 Subject: 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 --- actionpack/test/controller/resources_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/test/controller') 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'} -- cgit v1.2.3