mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 11:25:55 +01:00
Include an authentication method name in LDAP connection error messages (#33345).
Contributed by Yuichi HARADA. git-svn-id: http://svn.redmine.org/redmine/trunk@21310 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -168,9 +168,10 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
|
||||
auth_source.timeout = 1
|
||||
def auth_source.initialize_ldap_con(*args); sleep(5); end
|
||||
|
||||
assert_raise AuthSourceTimeoutException do
|
||||
error = assert_raise AuthSourceTimeoutException do
|
||||
auth_source.authenticate 'example1', '123456'
|
||||
end
|
||||
assert_match /\ALDAP: /, error.message
|
||||
end
|
||||
|
||||
def test_search_should_return_matching_entries
|
||||
@@ -210,9 +211,10 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
|
||||
auth_source.host = "badhost"
|
||||
auth_source.save!
|
||||
|
||||
assert_raise AuthSourceException do
|
||||
error = assert_raise AuthSourceException do
|
||||
auth_source.test_connection
|
||||
end
|
||||
assert_match /\ALDAP: /, error.message
|
||||
end
|
||||
|
||||
def test_test_connection_with_incorrect_port
|
||||
|
||||
Reference in New Issue
Block a user