Sha256: d5472d2aa30b49994c2a05da7e0c46f4b981009e917a2c247c4d0de572d65dc9

Contents?: true

Size: 587 Bytes

Versions: 9

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true
# rubocop:todo all

require 'spec_helper'

describe Mongo::Monitoring::Event::Cmap::PoolClosed do

  describe '#summary' do

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

    declare_topology_double

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

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

    it 'renders correctly' do
      expect(event.summary).to eq("#<PoolClosed address=127.0.0.1:27017 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/pool_closed_spec.rb
mongo-2.20.1 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb
mogno-2.20.0 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb
mogno-1.0.0 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb
mongo-2.20.0 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb
mongo-2.19.3 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb
mongo-2.19.2 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb
mongo-2.19.1 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb
mongo-2.19.0 spec/mongo/monitoring/event/cmap/pool_closed_spec.rb