aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/redirect_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/redirect_test.rb')
-rwxr-xr-xactionpack/test/controller/redirect_test.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/actionpack/test/controller/redirect_test.rb b/actionpack/test/controller/redirect_test.rb
index fafff144df..ee20457508 100755
--- a/actionpack/test/controller/redirect_test.rb
+++ b/actionpack/test/controller/redirect_test.rb
@@ -9,6 +9,10 @@ class RedirectController < ActionController::Base
redirect_to :dashbord_url, 1, "hello"
end
+ def host_redirect
+ redirect_to :action => "other_host", :only_path => false, :host => 'other.test.host'
+ end
+
def rescue_errors(e) raise e end
protected
@@ -33,4 +37,9 @@ class RedirectTest < Test::Unit::TestCase
get :method_redirect
assert_redirect_url "http://test.host/redirect/dashboard/1?message=hello"
end
-end \ No newline at end of file
+
+ def test_simple_redirect_using_options
+ get :host_redirect
+ assert_redirected_to :action => "other_host", :only_path => false, :host => 'other.test.host'
+ end
+end