spec/omniauth-ldap/adaptor_spec.rb in omniauth-ldap-1.0.4 vs spec/omniauth-ldap/adaptor_spec.rb in omniauth-ldap-1.0.5

- old
+ new

@@ -50,9 +50,14 @@ adaptor.connection.instance_variable_get('@auth')[:method].should == :sasl adaptor.connection.instance_variable_get('@auth')[:mechanism].should == 'GSS-SPNEGO' adaptor.connection.instance_variable_get('@auth')[:initial_credential].should =~ /^NTLMSSP/ adaptor.connection.instance_variable_get('@auth')[:challenge_response].should_not be_nil end + + it 'should set the encryption method correctly' do + adaptor = OmniAuth::LDAP::Adaptor.new({host: "192.168.1.145", method: 'tls', base: 'dc=intridea, dc=com', port: 389, uid: 'sAMAccountName'}) + adaptor.connection.instance_variable_get('@encryption').should include method: :start_tls + end end describe 'bind_as' do let(:args) { {:filter => Net::LDAP::Filter.eq('sAMAccountName', 'username'), :password => 'password', :size => 1} } let(:rs) { Struct.new(:dn).new('new dn') }