diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2012-05-11 07:23:24 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2012-05-11 07:29:17 +0100 |
commit | 9b4514c3b8ecfbc40a44dbd4c2ebd4ce67f4a459 (patch) | |
tree | 2a463159668be3d0b47b730d87cd91e2b00c72db /actionpack/test/dispatch/routing_assertions_test.rb | |
parent | 0d48b12fc56df574bb81cfaf0f5fb4713e9230fc (diff) | |
download | rails-9b4514c3b8ecfbc40a44dbd4c2ebd4ce67f4a459.tar.gz rails-9b4514c3b8ecfbc40a44dbd4c2ebd4ce67f4a459.tar.bz2 rails-9b4514c3b8ecfbc40a44dbd4c2ebd4ce67f4a459.zip |
Copy literal route constraints to defaults - fixes #3571 and #6224.
Diffstat (limited to 'actionpack/test/dispatch/routing_assertions_test.rb')
-rw-r--r-- | actionpack/test/dispatch/routing_assertions_test.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/test/dispatch/routing_assertions_test.rb b/actionpack/test/dispatch/routing_assertions_test.rb index e953029456..517354ae58 100644 --- a/actionpack/test/dispatch/routing_assertions_test.rb +++ b/actionpack/test/dispatch/routing_assertions_test.rb @@ -47,7 +47,7 @@ class RoutingAssertionsTest < ActionController::TestCase def test_assert_recognizes_with_extras assert_recognizes({ :controller => 'articles', :action => 'index', :page => '1' }, '/articles', { :page => '1' }) end - + def test_assert_recognizes_with_method assert_recognizes({ :controller => 'articles', :action => 'create' }, { :path => '/articles', :method => :post }) assert_recognizes({ :controller => 'articles', :action => 'update', :id => '1' }, { :path => '/articles/1', :method => :put }) @@ -57,7 +57,7 @@ class RoutingAssertionsTest < ActionController::TestCase assert_raise(ActionController::RoutingError) do assert_recognizes({ :controller => 'secure_articles', :action => 'index' }, 'http://test.host/secure/articles') end - assert_recognizes({ :controller => 'secure_articles', :action => 'index' }, 'https://test.host/secure/articles') + assert_recognizes({ :controller => 'secure_articles', :action => 'index', :protocol => 'https://' }, 'https://test.host/secure/articles') end def test_assert_recognizes_with_block_constraint @@ -90,7 +90,7 @@ class RoutingAssertionsTest < ActionController::TestCase assert_raise(ActionController::RoutingError) do assert_routing('http://test.host/secure/articles', { :controller => 'secure_articles', :action => 'index' }) end - assert_routing('https://test.host/secure/articles', { :controller => 'secure_articles', :action => 'index' }) + assert_routing('https://test.host/secure/articles', { :controller => 'secure_articles', :action => 'index', :protocol => 'https://' }) end def test_assert_routing_with_block_constraint |