Sha256: e5dfd45b06fe4edc34ed88b095dec7ff4155680f6cc5a9e5d650dba669b49f1e

Contents?: true

Size: 623 Bytes

Versions: 1

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

RSpec.describe LdapQuery::Connection do
  describe 'without credentials' do
    it { expect { described_class.new({}) }.to raise_error(LdapQuery::CredentialsError) }
    it { expect { described_class.new({ username: 'foobar', password: 'password' })}.to raise_error(LdapQuery::CredentialsError) }
  end

  describe 'valid connection' do
    let(:ldap_conn) { described_class.new({ port: 369, base: 'dc=company,dc=tld', host: 'company.tld', auth: { username: 'foobar', password: 'password' } }) }
    it { expect(ldap_conn.link.class.name).to eq('Net::LDAP')}
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ldap_query-0.0.1 spec/ldap_lookup/connection_spec.rb