mirror of
https://github.com/redmine/redmine.git
synced 2025-11-11 07:46:02 +01:00
Replaced ruby-net-ldap with net-ldap 0.2.2 gem.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8751 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
51
vendor/gems/net-ldap-0.2.2/spec/unit/ldap/entry_spec.rb
vendored
Normal file
51
vendor/gems/net-ldap-0.2.2/spec/unit/ldap/entry_spec.rb
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Net::LDAP::Entry do
|
||||
attr_reader :entry
|
||||
before(:each) do
|
||||
@entry = Net::LDAP::Entry.from_single_ldif_string(
|
||||
%Q{dn: something
|
||||
foo: foo
|
||||
barAttribute: bar
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
describe "entry access" do
|
||||
it "should always respond to #dn" do
|
||||
entry.should respond_to(:dn)
|
||||
end
|
||||
|
||||
context "<- #foo" do
|
||||
it "should respond_to?" do
|
||||
entry.should respond_to(:foo)
|
||||
end
|
||||
it "should return 'foo'" do
|
||||
entry.foo.should == ['foo']
|
||||
end
|
||||
end
|
||||
context "<- #Foo" do
|
||||
it "should respond_to?" do
|
||||
entry.should respond_to(:Foo)
|
||||
end
|
||||
it "should return 'foo'" do
|
||||
entry.foo.should == ['foo']
|
||||
end
|
||||
end
|
||||
context "<- #foo=" do
|
||||
it "should respond_to?" do
|
||||
entry.should respond_to(:foo=)
|
||||
end
|
||||
it "should set 'foo'" do
|
||||
entry.foo= 'bar'
|
||||
entry.foo.should == ['bar']
|
||||
end
|
||||
end
|
||||
context "<- #fOo=" do
|
||||
it "should return 'foo'" do
|
||||
entry.fOo= 'bar'
|
||||
entry.fOo.should == ['bar']
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user