Sha256: 921ede2d5ce64521d8d5d99f0d52259f4d163fc40ab984f93b054da93d2f6136

Contents?: true

Size: 409 Bytes

Versions: 10

Compression:

Stored size: 409 Bytes

Contents

require 'spec_helper'

describe Mongo::Socket::TCP do
  let(:socket) do
    described_class.new('127.0.0.1', SpecConfig.instance.any_port, 5, Socket::AF_INET)
  end

  describe '#human_address' do
    it 'returns the address and tls indicator' do
      addr = socket.send(:socket).remote_address
      expect(socket.send(:human_address)).to eq("#{addr.ip_address}:#{addr.ip_port} (no TLS)")
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mongo-2.13.3 spec/mongo/socket/tcp_spec.rb
mongo-2.14.1 spec/mongo/socket/tcp_spec.rb
mongo-2.15.0.alpha spec/mongo/socket/tcp_spec.rb
mongo-2.13.2 spec/mongo/socket/tcp_spec.rb
mongo-2.14.0 spec/mongo/socket/tcp_spec.rb
mongo-2.14.0.rc1 spec/mongo/socket/tcp_spec.rb
mongo-2.13.1 spec/mongo/socket/tcp_spec.rb
mongo-2.13.0 spec/mongo/socket/tcp_spec.rb
mongo-2.13.0.rc1 spec/mongo/socket/tcp_spec.rb
mongo-2.13.0.beta1 spec/mongo/socket/tcp_spec.rb