diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-03-03 22:19:54 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-03-03 22:19:54 +0000 |
commit | bf6d4cede7c4316321f9fafeda747ec3bfdf45c8 (patch) | |
tree | e733cd4675a59aabd21da24c4c82d3cc23f7a761 /actionpack/test/controller | |
parent | bda4009aeed7b5498c3d361895102d6e1ebeb7a2 (diff) | |
download | rails-bf6d4cede7c4316321f9fafeda747ec3bfdf45c8.tar.gz rails-bf6d4cede7c4316321f9fafeda747ec3bfdf45c8.tar.bz2 rails-bf6d4cede7c4316321f9fafeda747ec3bfdf45c8.zip |
Added user/password options for url_for to add http authentication in a URL [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6302 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r-- | actionpack/test/controller/url_rewriter_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/controller/url_rewriter_test.rb b/actionpack/test/controller/url_rewriter_test.rb index f24e5c9c37..178f44f15f 100644 --- a/actionpack/test/controller/url_rewriter_test.rb +++ b/actionpack/test/controller/url_rewriter_test.rb @@ -23,6 +23,13 @@ class UrlRewriterTests < Test::Unit::TestCase ) end + def test_user_name_and_password + assert_equal( + 'http://david:secret@test.host/c/a/i', + @rewriter.rewrite(:user => "david", :password => "secret", :controller => 'c', :action => 'a', :id => 'i') + ) + end + def test_overwrite_params @params[:controller] = 'hi' @params[:action] = 'bye' |