Sha256: 43469805cd5f9ab0b95c3641c63f10908b63ac349d7ec4bc0fe7458cb812d512

Contents?: true

Size: 533 Bytes

Versions: 6

Compression:

Stored size: 533 Bytes

Contents

require "spec_helper"

describe ApiClient::Connection::Middlewares::Request::Logger do

  it "adds a oauth header to the request" do
    app      = double
    logger   = FakeLogger.new
    instance = ApiClient::Connection::Middlewares::Request::Logger.new(app, logger)
    env = {
      :url => "http://api.twitter.com",
      :request_headers => {},
      :method => 'get'
    }
    app.should_receive(:call).with(env)
    instance.call(env)
    logger.history.first.include?("GET http://api.twitter.com").should be_true
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
api_client-0.5.15 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.14 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.13 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.12 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.11 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.9 spec/api_client/connection/request/logger_spec.rb