aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/test/cases
diff options
context:
space:
mode:
authorManuel Menezes de Sequeira <MMSequeira@gmail.com>2011-10-05 22:14:49 +0100
committerManuel Menezes de Sequeira <MMSequeira@gmail.com>2011-10-05 22:14:49 +0100
commit07343d2974ab77bfd21c0f35930cd394ba5b164e (patch)
treec64f8b54507d41ccb2c59cb096ee8b1f2a31e2df /activeresource/test/cases
parent8d775d5f1d58e5c0d881383e8c6e869d1d360c8c (diff)
parentd6c7185d77158caee933e84b247e37bb6a67bf58 (diff)
downloadrails-07343d2974ab77bfd21c0f35930cd394ba5b164e.tar.gz
rails-07343d2974ab77bfd21c0f35930cd394ba5b164e.tar.bz2
rails-07343d2974ab77bfd21c0f35930cd394ba5b164e.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activeresource/test/cases')
-rw-r--r--activeresource/test/cases/authorization_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activeresource/test/cases/authorization_test.rb b/activeresource/test/cases/authorization_test.rb
index 69ef9a2821..17cd9b30fc 100644
--- a/activeresource/test/cases/authorization_test.rb
+++ b/activeresource/test/cases/authorization_test.rb
@@ -131,6 +131,12 @@ class AuthorizationTest < Test::Unit::TestCase
assert_equal blank_digest_auth_header("/people/2.json", "fad396f6a34aeba28e28b9b96ddbb671"), authorization_header['Authorization']
end
+ def test_authorization_header_with_query_string_if_auth_type_is_digest
+ @authenticated_conn.auth_type = :digest
+ authorization_header = @authenticated_conn.__send__(:authorization_header, :get, URI.parse('/people/2.json?only=name'))
+ assert_equal blank_digest_auth_header("/people/2.json?only=name", "f8457b0b5d21b6b80737a386217afb24"), authorization_header['Authorization']
+ end
+
def test_get
david = decode(@authenticated_conn.get("/people/2.json"))
assert_equal "David", david["name"]