Sha256: b0aa362c0e364c8328064693c83fa7ffbe9fcd3102fb1e11119e54eba89562cc

Contents?: true

Size: 1.63 KB

Versions: 23

Compression:

Stored size: 1.63 KB

Contents

require 'common'

=begin
class TestEntry < Test::Unit::TestCase
Commented out until I can make it a spec.
  context "An instance of Entry" do
    setup do
      @entry = Net::LDAP::Entry.new 'cn=Barbara,o=corp'
    end

    should "be initialized with the DN" do
      assert_equal 'cn=Barbara,o=corp', @entry.dn
    end

    should 'return an empty array when accessing a nonexistent attribute (index lookup)' do
      assert_equal [], @entry['sn']
    end

    should 'return an empty array when accessing a nonexistent attribute (method call)' do
      assert_equal [], @entry.sn
    end

    should 'create an attribute on assignment (index lookup)' do
      @entry['sn'] = 'Jensen'
      assert_equal ['Jensen'], @entry['sn']
    end

    should 'create an attribute on assignment (method call)' do
      @entry.sn = 'Jensen'
      assert_equal ['Jensen'], @entry.sn
    end

    should 'have attributes accessible by index lookup' do
      @entry['sn'] = 'Jensen'
      assert_equal ['Jensen'], @entry['sn']
    end

    should 'have attributes accessible using a Symbol as the index' do
      @entry[:sn] = 'Jensen'
      assert_equal ['Jensen'], @entry[:sn]
    end

    should 'have attributes accessible by method call' do
      @entry['sn'] = 'Jensen'
      assert_equal ['Jensen'], @entry.sn
    end

    should 'ignore case of attribute names' do
      @entry['sn'] = 'Jensen'
      assert_equal ['Jensen'], @entry.sn
      assert_equal ['Jensen'], @entry.Sn
      assert_equal ['Jensen'], @entry.SN
      assert_equal ['Jensen'], @entry['sn']
      assert_equal ['Jensen'], @entry['Sn']
      assert_equal ['Jensen'], @entry['SN']
    end
	end
end
=end

Version data entries

23 entries across 23 versions & 9 rubygems

Version Path
net-ldap-0.8.0 test/test_entry.rb
net-ldap-0.7.0 test/test_entry.rb
net-ldap-0.6.1 test/test_entry.rb
net-ldap-0.6.0 test/test_entry.rb
net-ldap-0.5.1 test/test_entry.rb
datacom-net-ldap-0.5.0.datacom test/test_entry.rb
socialcast-net-ldap-0.1.8 test/test_entry.rb
socialcast-net-ldap-0.1.7 test/test_entry.rb
adams-net-ldap-0.4.0 test/test_entry.rb
obis-net-ldap-0.4.0 test/test_entry.rb
net-ldap-1-0.4.0 test/test_entry.rb
socialcast-net-ldap-0.1.6 test/test_entry.rb
socialcast-net-ldap-0.1.5 test/test_entry.rb
net-ldap-0.3.1 test/test_entry.rb
net-ldap-0.3.0 test/test_entry.rb
prathe_net-ldap-0.2.20110317223538 test/test_entry.rb
prathe-net-ldap-0.2.20110317223538 test/test_entry.rb
net-ldap-0.2.2 test/test_entry.rb
net-ldap-0.2.1 test/test_entry.rb
net-ldap-0.2 test/test_entry.rb