aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller
diff options
context:
space:
mode:
authorJarrod Carlson <jarrod.carlson@gmail.com>2011-10-05 00:18:37 -0400
committerPiotr Sarnacki <drogus@gmail.com>2011-12-20 18:03:49 +0100
commit53c1ae99f587d6d7f85a3910f97948906ebba877 (patch)
tree2ca9693206a3eeb8e844e5fef8629117ca0e1020 /actionpack/test/controller
parent4fa615a8661eb13d4bd8a7de4d839e9883ef26ec (diff)
downloadrails-53c1ae99f587d6d7f85a3910f97948906ebba877.tar.gz
rails-53c1ae99f587d6d7f85a3910f97948906ebba877.tar.bz2
rails-53c1ae99f587d6d7f85a3910f97948906ebba877.zip
Added failing test to demonstrate digest authentication failure
Diffstat (limited to 'actionpack/test/controller')
-rw-r--r--actionpack/test/controller/http_digest_authentication_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/controller/http_digest_authentication_test.rb b/actionpack/test/controller/http_digest_authentication_test.rb
index b011536717..25fda58232 100644
--- a/actionpack/test/controller/http_digest_authentication_test.rb
+++ b/actionpack/test/controller/http_digest_authentication_test.rb
@@ -208,6 +208,16 @@ class HttpDigestAuthenticationTest < ActionController::TestCase
assert !ActionController::HttpAuthentication::Digest.validate_digest_response(@request, "SuperSecret"){nil}
end
+ test "authentication request with request-uri ending in '?'" do
+ @request.env['HTTP_AUTHORIZATION'] = encode_credentials(:username => 'pretty', :password => 'please',
+ :uri => '/http_digest_authentication_test/dummy_digest?')
+ @request.env['PATH_INFO'] = "/http_digest_authentication_test/dummy_digest?"
+ get :display
+
+ assert_response :success
+ assert_equal 'Definitely Maybe', @response.body
+ end
+
private
def encode_credentials(options)