Skip to content

Commit

Permalink
Fix authorization tests (omniauth 1.0 uses info instead of user_info …
Browse files Browse the repository at this point in the history
…in hash)
  • Loading branch information
robban committed Jan 11, 2013
1 parent 66f84fe commit ae18f25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/authorization_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class AuthorizationTest < ActiveSupport::TestCase
test "should find existing from hash" do
auth = Authorization.create_from_hash(auth_hash)
assert_equal(auth.email, '[email protected]')
existing = Authorization.find_or_create_from_hash(auth_hash.merge('user_info' => {'email' => '[email protected]'}))
existing = Authorization.find_or_create_from_hash(auth_hash.merge('info' => {'email' => '[email protected]'}))
assert_equal(auth, existing)
assert_equal(existing.email, '[email protected]')
end
Expand Down Expand Up @@ -45,7 +45,7 @@ class AuthorizationTest < ActiveSupport::TestCase
def auth_hash
OmniAuth.config.mock_auth[:default].merge({ 'provider' => 'twitter',
'uid' => '12345',
'user_info' => {
'info' => {
'nickname' => 'omniauthuser',
'email' => '[email protected]'
}
Expand Down

0 comments on commit ae18f25

Please sign in to comment.