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:
@@ -149,7 +149,7 @@ class AccountTest < ActionController::IntegrationTest
|
||||
def test_onthefly_registration
|
||||
# disable registration
|
||||
Setting.self_registration = '0'
|
||||
AuthSource.expects(:authenticate).returns([:login => 'foo', :firstname => 'Foo', :lastname => 'Smith', :mail => 'foo@bar.com', :auth_source_id => 66])
|
||||
AuthSource.expects(:authenticate).returns({:login => 'foo', :firstname => 'Foo', :lastname => 'Smith', :mail => 'foo@bar.com', :auth_source_id => 66})
|
||||
|
||||
post 'account/login', :username => 'foo', :password => 'bar'
|
||||
assert_redirected_to 'my/page'
|
||||
@@ -163,7 +163,7 @@ class AccountTest < ActionController::IntegrationTest
|
||||
def test_onthefly_registration_with_invalid_attributes
|
||||
# disable registration
|
||||
Setting.self_registration = '0'
|
||||
AuthSource.expects(:authenticate).returns([:login => 'foo', :lastname => 'Smith', :auth_source_id => 66])
|
||||
AuthSource.expects(:authenticate).returns({:login => 'foo', :lastname => 'Smith', :auth_source_id => 66})
|
||||
|
||||
post 'account/login', :username => 'foo', :password => 'bar'
|
||||
assert_response :success
|
||||
|
||||
Reference in New Issue
Block a user