summaryrefslogtreecommitdiffstats
path: root/test/unit/auth_source_ldap_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-26 09:13:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-26 09:13:12 +0000
commitd6f9e576e88dae3aeec6a4997d1dcf00c9821878 (patch)
tree6fb8f14474e8e5ea96f017af2bf5770dcb80c009 /test/unit/auth_source_ldap_test.rb
parentf1d16bc0076de863c4a419c555079016280752fa (diff)
downloadredmine-d6f9e576e88dae3aeec6a4997d1dcf00c9821878.tar.gz
redmine-d6f9e576e88dae3aeec6a4997d1dcf00c9821878.zip
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
Diffstat (limited to 'test/unit/auth_source_ldap_test.rb')
-rw-r--r--test/unit/auth_source_ldap_test.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/unit/auth_source_ldap_test.rb b/test/unit/auth_source_ldap_test.rb
index f78d6452f..885272c11 100644
--- a/test/unit/auth_source_ldap_test.rb
+++ b/test/unit/auth_source_ldap_test.rb
@@ -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]