aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-08-10 10:40:11 -0300
committerEmilio Tagua <miloops@gmail.com>2009-08-10 10:40:11 -0300
commiteb3ae44ccaff1dc63eb31bf86d8db07c88ddc413 (patch)
tree9997bd3739e30fad0102a22e8feee40c4c4c835c /actionpack/test/controller
parent952014315926d370f2a0b681cb765948bf2e6883 (diff)
parent5786395760f1e1906c878df4023cac3741e66e87 (diff)
downloadrails-eb3ae44ccaff1dc63eb31bf86d8db07c88ddc413.tar.gz
rails-eb3ae44ccaff1dc63eb31bf86d8db07c88ddc413.tar.bz2
rails-eb3ae44ccaff1dc63eb31bf86d8db07c88ddc413.zip
Merge commit 'rails/master'
Conflicts: activerecord/lib/active_record/migration.rb
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/redirect_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index b3321303c0..7755af592d 100644
--- a/actionpack/test/controller/redirect_test.rb
+++ b/actionpack/test/controller/redirect_test.rb
@@ -34,6 +34,10 @@ class RedirectController < ActionController::Base
redirect_to({:action => "hello_world"}, {:status => 301})
end
+ def redirect_with_protocol
+ redirect_to :action => "hello_world", :protocol => "https"
+ end
+
def url_redirect_with_status
redirect_to("http://www.example.com", :status => :moved_permanently)
end
@@ -132,6 +136,12 @@ class RedirectTest < ActionController::TestCase
assert_equal "http://test.host/redirect/hello_world", redirect_to_url
end
+ def test_redirect_with_protocol
+ get :redirect_with_protocol
+ assert_response 302
+ assert_equal "https://test.host/redirect/hello_world", redirect_to_url
+ end
+
def test_url_redirect_with_status
get :url_redirect_with_status
assert_response 301