add test of replace port zero to 389 at unit auth_source_ldap_test.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6745 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-08-29 14:03:57 +00:00
parent bc169cf466
commit 813f69a689
1 changed files with 9 additions and 0 deletions

View File

@ -35,6 +35,15 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
assert_equal 'givenName', a.reload.attr_firstname assert_equal 'givenName', a.reload.attr_firstname
end end
def test_replace_port_zero_to_389
a = AuthSourceLdap.new(
:name => 'My LDAP', :host => 'ldap.example.net', :port => 0,
:base_dn => 'dc=example,dc=net', :attr_login => 'sAMAccountName',
:attr_firstname => 'givenName ')
assert a.save
assert_equal 389, a.port
end
if ldap_configured? if ldap_configured?
context '#authenticate' do context '#authenticate' do
setup do setup do