Sha256: b8377ddef4f9c97489c294d4ed7617954129cf80ee9005ec827c2c6d09fec10d

Contents?: true

Size: 534 Bytes

Versions: 8

Compression:

Stored size: 534 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.should == "GET http://api.twitter.com: 0.0000 seconds"
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
api_client-0.5.7 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.6 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.5 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.4 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.3 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.2 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.1 spec/api_client/connection/request/logger_spec.rb
api_client-0.5.0 spec/api_client/connection/request/logger_spec.rb