mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 10:56:17 +01:00
Fixed that LDAP error is not displayed when testing connection.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9234 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -117,11 +117,11 @@ class AuthSourcesControllerTest < ActionController::TestCase
|
||||
end
|
||||
|
||||
def test_test_connection_with_failure
|
||||
AuthSourceLdap.any_instance.stubs(:test_connection).raises(Exception.new("Something went wrong"))
|
||||
AuthSourceLdap.any_instance.stubs(:initialize_ldap_con).raises(Net::LDAP::LdapError.new("Something went wrong"))
|
||||
|
||||
get :test_connection, :id => 1
|
||||
assert_redirected_to '/auth_sources'
|
||||
assert_not_nil flash[:error]
|
||||
assert_include '(Something went wrong)', flash[:error]
|
||||
assert_include 'Something went wrong', flash[:error]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user