Sha256: e77634ad50e02b40bb31f47e82619f49f7768f2b591a6014f718f0ccd3eba889

Contents?: true

Size: 470 Bytes

Versions: 14

Compression:

Stored size: 470 Bytes

Contents

require 'helper'

class OAuth2Test < Test::Unit::TestCase
  context 'when used' do
    setup do
      @stubs = Faraday::Adapter::Test::Stubs.new
      @stubs.get('/me?access_token=OU812') {[200, {}, 'pengwynn']}
    end

    should 'add the access token to the request' do
      do_you  = Faraday::Connection.new do |builder|
        builder.use Faraday::Request::OAuth2, 'OU812'
        builder.adapter :test, @stubs
      end
      do_you.get("/me")
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
faraday_middleware-0.3.2 test/oauth2_test.rb
faraday_middleware-0.3.1 test/oauth2_test.rb
faraday_middleware-0.3.0 test/oauth2_test.rb
faraday_middleware-0.2.3 test/oauth2_test.rb
faraday_middleware-0.2.2 test/oauth2_test.rb
faraday_middleware-0.2.1 test/oauth2_test.rb
faraday_middleware-0.2.0 test/oauth2_test.rb
faraday_middleware-0.1.7 test/oauth2_test.rb
faraday_middleware-0.1.6 test/oauth2_test.rb
faraday_middleware-0.1.5 test/oauth2_test.rb
faraday_middleware-0.1.4 test/oauth2_test.rb
faraday_middleware-0.1.3 test/oauth2_test.rb
faraday_middleware-0.1.2 test/oauth2_test.rb
faraday_middleware-0.1.1 test/oauth2_test.rb