Sha256: 77f4da7affad3173c9509112c0e9f1b3a7a78f912a7361ae87dcae8c396b9e12
Contents?: true
Size: 730 Bytes
Versions: 8
Compression:
Stored size: 730 Bytes
Contents
require 'spec_helper' describe DataMapper.repository(:ldap).adapter do describe 'user authentication' do before do DataMapper.repository(:ldap) do User.all.destroy! @user = User.new(:login => "beige", :name => 'Beige') @user.password = "asd123" @user.save end end it 'should successfully authenticate' do DataMapper.repository(:ldap) do @user.authenticate("asd123").should be_true @user.password = "asd" @user.save @user.authenticate("asd").should be_true end end it 'should not authenticate' do DataMapper.repository(:ldap) do @user.authenticate("asdasd").should be_false end end end end
Version data entries
8 entries across 8 versions & 1 rubygems