diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-12 21:25:50 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-02-12 21:25:50 +0000 |
commit | ff9da0bab038ea118b839dd2d9e93a4d1a37e274 (patch) | |
tree | 291390f695c5abbbe5c2dad973e312923830694d /vendor/gems/ruby-openid-2.1.4/test/test_responses.rb | |
parent | 5bdd4291624cabee530e1c40be79c19ba6fb09dd (diff) | |
download | redmine-ff9da0bab038ea118b839dd2d9e93a4d1a37e274.tar.gz redmine-ff9da0bab038ea118b839dd2d9e93a4d1a37e274.zip |
Removes the fat ruby-openid gem. Simply use 'gem install ruby-openid' to enable openid support.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2458 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor/gems/ruby-openid-2.1.4/test/test_responses.rb')
-rw-r--r-- | vendor/gems/ruby-openid-2.1.4/test/test_responses.rb | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/vendor/gems/ruby-openid-2.1.4/test/test_responses.rb b/vendor/gems/ruby-openid-2.1.4/test/test_responses.rb deleted file mode 100644 index 61a0e4c19..000000000 --- a/vendor/gems/ruby-openid-2.1.4/test/test_responses.rb +++ /dev/null @@ -1,63 +0,0 @@ -require "test/unit" -require "openid/consumer/discovery" -require "openid/consumer/responses" - -module OpenID - class Consumer - module TestResponses - class TestSuccessResponse < Test::Unit::TestCase - def setup - @endpoint = OpenIDServiceEndpoint.new - @endpoint.claimed_id = 'identity_url' - end - - def test_extension_response - q = { - 'ns.sreg' => 'urn:sreg', - 'ns.unittest' => 'urn:unittest', - 'unittest.one' => '1', - 'unittest.two' => '2', - 'sreg.nickname' => 'j3h', - 'return_to' => 'return_to', - } - signed_list = q.keys.map { |k| 'openid.' + k } - msg = Message.from_openid_args(q) - resp = SuccessResponse.new(@endpoint, msg, signed_list) - utargs = resp.extension_response('urn:unittest', false) - assert_equal(utargs, {'one' => '1', 'two' => '2'}) - sregargs = resp.extension_response('urn:sreg', false) - assert_equal(sregargs, {'nickname' => 'j3h'}) - end - - def test_extension_response_signed - args = { - 'ns.sreg' => 'urn:sreg', - 'ns.unittest' => 'urn:unittest', - 'unittest.one' => '1', - 'unittest.two' => '2', - 'sreg.nickname' => 'j3h', - 'sreg.dob' => 'yesterday', - 'return_to' => 'return_to', - 'signed' => 'sreg.nickname,unittest.one,sreg.dob', - } - - signed_list = ['openid.sreg.nickname', - 'openid.unittest.one', - 'openid.sreg.dob',] - - msg = Message.from_openid_args(args) - resp = SuccessResponse.new(@endpoint, msg, signed_list) - - # All args in this NS are signed, so expect all. - sregargs = resp.extension_response('urn:sreg', true) - assert_equal(sregargs, {'nickname' => 'j3h', 'dob' => 'yesterday'}) - - # Not all args in this NS are signed, so expect nil when - # asking for them. - utargs = resp.extension_response('urn:unittest', true) - assert_equal(nil, utargs) - end - end - end - end -end |