Sha256: c04e059082ace8c0d04a39df8adddca6e65e36f44ab35c0dd945c4371a59f027

Contents?: true

Size: 496 Bytes

Versions: 3

Compression:

Stored size: 496 Bytes

Contents

require 'spec_helper'

describe NetLdapPatches::Connection::NextMsgid do
  describe '#next_msgid' do
    context 'when ENV["NET_LDAP_INITIAL_MSGID"] is not present' do
      it { expect(Net::LDAP::Connection.new.next_msgid).to eq 301 }
    end
    context 'when ENV["NET_LDAP_INITIAL_MSGID"] is present' do
      before { ENV['NET_LDAP_INITIAL_MSGID'] = '5' }
      after { ENV.delete 'NET_LDAP_INITIAL_MSGID' }
      it { expect(Net::LDAP::Connection.new.next_msgid).to eq 6 }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
socialcast-1.4.4 spec/net_ldap_patches/connection/next_msgid_spec.rb
socialcast-1.4.3 spec/net_ldap_patches/connection/next_msgid_spec.rb
socialcast-1.4.2 spec/net_ldap_patches/connection/next_msgid_spec.rb