Sha256: 6bff3f5b717f53f5769863e5422780ce550c667a7df5514b7da8cf6c8634063e

Contents?: true

Size: 843 Bytes

Versions: 16

Compression:

Stored size: 843 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)
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

16 entries across 15 versions & 7 rubygems

Version Path
tdiary-4.2.1 vendor/bundle/ruby/2.2.0/gems/oauth-0.4.7/test/test_signature_base.rb
tdiary-4.2.1 vendor/bundle/ruby/2.3.0/gems/oauth-0.4.7/test/test_signature_base.rb
oauth-ap-0.4.8 test/test_signature_base.rb
oauth-instructure-0.4.10 test/test_signature_base.rb
oauth_weshays-0.4.8.pre2 test/test_signature_base.rb
oauth_weshays-0.4.8.pre test/test_signature_base.rb
oauth-instructure-0.4.9 test/test_signature_base.rb
oauth-instructure-0.4.8 test/test_signature_base.rb
oauth-0.4.7 test/test_signature_base.rb
motionbox-oauth-0.4.5 test/test_signature_base.rb
oauth-0.4.6 test/test_signature_base.rb
oauth-0.4.5 test/test_signature_base.rb
sayso-oauth-0.4.4.001 test/test_signature_base.rb
oauth-0.4.4 test/test_signature_base.rb
oauth-0.4.3 test/test_signature_base.rb
oauth-0.4.2 test/test_signature_base.rb