mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 06:46:54 +02:00
Friendly response when the LDAP connection fails.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8911 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -51,6 +51,16 @@ class AccountControllerTest < ActionController::TestCase
|
||||
:content => /Invalid user or password/
|
||||
end
|
||||
|
||||
def test_login_should_rescue_auth_source_exception
|
||||
source = AuthSource.create!(:name => 'Test')
|
||||
User.find(2).update_attribute :auth_source_id, source.id
|
||||
AuthSource.any_instance.stubs(:authenticate).raises(AuthSourceException.new("Something wrong"))
|
||||
|
||||
post :login, :username => 'jsmith', :password => 'jsmith'
|
||||
assert_response 500
|
||||
assert_error_tag :content => /Something wrong/
|
||||
end
|
||||
|
||||
if Object.const_defined?(:OpenID)
|
||||
|
||||
def test_login_with_openid_for_existing_user
|
||||
|
||||
Reference in New Issue
Block a user