Sha256: 55822f44116b62017f920d45598a5c3c5a20704f1c0e2dfabfd81b91d1546332

Contents?: true

Size: 609 Bytes

Versions: 23

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'

describe Mongo::Monitoring::Event::Cmap::ConnectionCheckedOut do

  describe '#summary' do

    let(:address) do
      Mongo::Address.new('127.0.0.1:27017')
    end

    let(:id) do
      1
    end

    declare_topology_double

    let(:pool) do
      server = make_server(:primary)
      Mongo::Server::ConnectionPool.new(server)
    end

    let(:event) do
      described_class.new(address, id, pool)
    end

    it 'renders correctly' do
      expect(event.summary).to eq("#<ConnectionCheckedOut address=127.0.0.1:27017 connection_id=1 pool=0x#{pool.object_id}>")
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
mongo-2.11.1 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.11.0 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.11.0.rc0 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb