diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-08-29 14:03:57 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2011-08-29 14:03:57 +0000 |
commit | 813f69a68984721cf5873fb0503688c6622e7b2a (patch) | |
tree | 67afb42f1f115dd0b710be410e6526c51d0a7bf5 /test/unit/auth_source_ldap_test.rb | |
parent | bc169cf466dbe4ea1e6653e59d59b59eb184ff0c (diff) | |
download | redmine-813f69a68984721cf5873fb0503688c6622e7b2a.tar.gz redmine-813f69a68984721cf5873fb0503688c6622e7b2a.zip |
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
Diffstat (limited to 'test/unit/auth_source_ldap_test.rb')
-rw-r--r-- | test/unit/auth_source_ldap_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/auth_source_ldap_test.rb b/test/unit/auth_source_ldap_test.rb index 001f7bd78..f9ee8e0e9 100644 --- a/test/unit/auth_source_ldap_test.rb +++ b/test/unit/auth_source_ldap_test.rb @@ -35,6 +35,15 @@ class AuthSourceLdapTest < ActiveSupport::TestCase assert_equal 'givenName', a.reload.attr_firstname 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? context '#authenticate' do setup do |