test/test_base.rb in activeldap-1.2.4 vs test/test_base.rb in activeldap-3.1.0
- old
+ new
@@ -1125,9 +1125,18 @@
assert_equal(new_cn2, new_user2.cn)
end
end
end
+ def test_to_key
+ uid = "bob"
+ new_user = @user_class.new
+ assert_equal(nil, new_user.to_key)
+
+ new_user.uid = uid
+ assert_equal([new_user.dn], new_user.to_key)
+ end
+
private
def detect_modify(object)
modify_called = false
singleton_class = class << object; self; end
singleton_class.send(:define_method, :modify_entry) do |*args|