Sha256: 3e07167129ac12f8f46a7b80e7946b3290d6fe922860e8ed211a28c19b73b392

Contents?: true

Size: 660 Bytes

Versions: 9

Compression:

Stored size: 660 Bytes

Contents

# frozen_string_literal: true
# rubocop:todo all

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

9 entries across 9 versions & 2 rubygems

Version Path
mongo-2.21.0 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.20.1 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mogno-2.20.0 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mogno-1.0.0 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.20.0 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.19.3 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.19.2 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.19.1 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb
mongo-2.19.0 spec/mongo/monitoring/event/cmap/connection_checked_out_spec.rb