Sha256: 5cb39ea3189c43d41f1d723ade0ada0ff3e1bf6137a479dd7152b3c68047ca0a
Contents?: true
Size: 833 Bytes
Versions: 16
Compression:
Stored size: 833 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 require 'spec_helper' require 'support/shared/auth_context' describe Mongo::Auth::LDAP do let(:server) do authorized_client.cluster.next_primary end include_context 'auth unit tests' let(:user) do Mongo::Auth::User.new( database: '$external', user: 'driver', password: 'password', ) end describe '#login' do before do connection.connect! end context 'when the user is not authorized for the database' do let(:cr) do described_class.new(user, connection) end let(:login) do cr.login.documents[0] end it 'attempts to log the user into the connection' do expect { cr.login }.to raise_error(Mongo::Auth::Unauthorized) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems