Sha256: 0f21440c8b5cde7d7eddeac211e4483227430a76d6a9e90adabf6483113a6628
Contents?: true
Size: 692 Bytes
Versions: 19
Compression:
Stored size: 692 Bytes
Contents
require "spec_helper" describe ApiClient::Connection::Middlewares::Request::OAuth do it "adds a oauth header to the request" do app = mock options = { :token => 'TOKEN', :token_secret => 'SECRET', :consumer_key => 'CONSUMER_KEY', :consumer_secret => 'CONSUMER_SECRET' } instance = ApiClient::Connection::Middlewares::Request::OAuth.new(app, options) env = { :url => "http://api.twitter.com", :request_headers => {} } app.should_receive(:call).with(env) instance.call(env) env[:request_headers]['Authorization'].should match("OAuth") env[:request_headers]['User-Agent'].should match("ApiClient gem") end end
Version data entries
19 entries across 19 versions & 1 rubygems