Sha256: 7b7b451148a841f29e7ec41c387a759f81a027923f555d6311fb922a1162ab6d
Contents?: true
Size: 699 Bytes
Versions: 2
Compression:
Stored size: 699 Bytes
Contents
require 'spec_helper' describe Devise::LDAP::Adapter do describe '#expired_valid_credentials?' do before do ::Devise.ldap_use_admin_to_bind = true expect_any_instance_of(Devise::LDAP::Connection).to receive(:expired_valid_credentials?) end it 'can bind as the admin user' do expect(Devise::LDAP::Connection).to receive(:new) .with(hash_including( :login => 'test.user@test.com', :password => 'pass', :ldap_auth_username_builder => kind_of(Proc), :admin => true)).and_call_original Devise::LDAP::Adapter.expired_valid_credentials?('test.user@test.com', 'pass') end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
devise_ldap_authenticatable-0.8.7 | spec/unit/adapter_spec.rb |
devise_ldap_authenticatable-0.8.6 | spec/unit/adapter_spec.rb |