summaryrefslogtreecommitdiffstats
path: root/test/functional/auth_sources_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-11 12:01:41 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-11 12:01:41 +0000
commita8e392c0e5732e934b6e45a68a69e9e0170432c9 (patch)
tree2137e0d6a33166a1a8566ab6432a511d836ec034 /test/functional/auth_sources_controller_test.rb
parent71e636ff71791bafdc2638d4916c68f5235e957a (diff)
downloadredmine-a8e392c0e5732e934b6e45a68a69e9e0170432c9.tar.gz
redmine-a8e392c0e5732e934b6e45a68a69e9e0170432c9.zip
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
Diffstat (limited to 'test/functional/auth_sources_controller_test.rb')
-rw-r--r--test/functional/auth_sources_controller_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/auth_sources_controller_test.rb b/test/functional/auth_sources_controller_test.rb
index 96dcb5c78..ae197e227 100644
--- a/test/functional/auth_sources_controller_test.rb
+++ b/test/functional/auth_sources_controller_test.rb
@@ -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