From bf6d4cede7c4316321f9fafeda747ec3bfdf45c8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 3 Mar 2007 22:19:54 +0000 Subject: 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 --- actionpack/test/controller/url_rewriter_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test') 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' -- cgit v1.2.3