Sha256: ca4606aaf06271fbfa929723aa25e67224b2febf26759cbae166267fcbc5c9d9

Contents?: true

Size: 841 Bytes

Versions: 61

Compression:

Stored size: 841 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper.rb'
require 'oauth/signature/base'
require 'net/http'
class SignatureBaseTest < Test::Unit::TestCase

  def test_that_initialize_requires_one_request_argument
    assert_raises ArgumentError do
      OAuth::Signature::Base.new()
    end
  end

  def test_that_initialize_requires_a_valid_request_argument
    request = nil
    assert_raises TypeError do
      OAuth::Signature::Base.new(request) { |token|
        # just a stub
      }
    end
  end

  def test_that_initialize_succeeds_when_the_request_proxy_is_valid
    # this isn't quite valid, but it will do.
    raw_request = Net::HTTP::Get.new('/test')
    request = OAuth::RequestProxy.proxy(raw_request)
    assert_nothing_raised do
      OAuth::Signature::Base.new(request) { |token|
        # just a stub
      }
    end
  end

end

Version data entries

61 entries across 61 versions & 19 rubygems

Version Path
greut-oauth-0.3.6 test/test_signature_base.rb
jwhitmire-oauth-0.3.6.1 test/test_signature_base.rb
metavida-oauth-0.3.2.1 test/test_signature_base.rb
metavida-oauth-0.3.2 test/test_signature_base.rb
mojodna-oauth-0.3.1.1 test/test_signature_base.rb
mojodna-oauth-0.3.1.2 test/test_signature_base.rb
mojodna-oauth-0.3.1.3 test/test_signature_base.rb
mojodna-oauth-0.3.1.4 test/test_signature_base.rb
mojodna-oauth-0.3.1.5 test/test_signature_base.rb
mojodna-oauth-0.3.1.6 test/test_signature_base.rb
mojodna-oauth-0.3.1.7 test/test_signature_base.rb
mojodna-oauth-0.3.1.8 test/test_signature_base.rb
mojodna-oauth-0.3.2.1 test/test_signature_base.rb
mojodna-oauth-0.3.2.2 test/test_signature_base.rb
mojodna-oauth-0.3.2 test/test_signature_base.rb
mojodna-oauth-0.3.3 test/test_signature_base.rb
mojodna-oauth-0.3.4.1 test/test_signature_base.rb
mojodna-oauth-0.3.4 test/test_signature_base.rb
mojodna-oauth-0.3.5 test/test_signature_base.rb
mojodna-oauth-0.3.6 test/test_signature_base.rb