Makes AuthSource.authenticate return a hash instead of an array.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3492 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-02-26 09:13:12 +00:00
parent f1d16bc007
commit d6f9e576e8
4 changed files with 12 additions and 14 deletions
+2 -4
View File
@@ -43,10 +43,8 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
context 'with a valid LDAP user' do
should 'return the user attributes' do
response = @auth.authenticate('example1','123456')
assert response.is_a?(Array), "An array was not returned"
assert response.first.present?, "No user data returned"
attributes = response.first
attributes = @auth.authenticate('example1','123456')
assert attributes.is_a?(Hash), "An hash was not returned"
assert_equal 'Example', attributes[:firstname]
assert_equal 'One', attributes[:lastname]
assert_equal 'example1@redmine.org', attributes[:mail]