@@ -35,6 +35,15 class AuthSourceLdapTest < ActiveSupport::TestCase | |||
|
35 | 35 | assert_equal 'givenName', a.reload.attr_firstname |
|
36 | 36 | end |
|
37 | 37 | |
|
38 | def test_replace_port_zero_to_389 | |
|
39 | a = AuthSourceLdap.new( | |
|
40 | :name => 'My LDAP', :host => 'ldap.example.net', :port => 0, | |
|
41 | :base_dn => 'dc=example,dc=net', :attr_login => 'sAMAccountName', | |
|
42 | :attr_firstname => 'givenName ') | |
|
43 | assert a.save | |
|
44 | assert_equal 389, a.port | |
|
45 | end | |
|
46 | ||
|
38 | 47 | if ldap_configured? |
|
39 | 48 | context '#authenticate' do |
|
40 | 49 | setup do |
General Comments 0
You need to be logged in to leave comments.
Login now