- good_token = create(:oauth_access_token,
- :resource_owner_id => user.id,
- :scopes => %w[read_prefs])
- bad_token = create(:oauth_access_token,
- :resource_owner_id => user.id)
- email_token = create(:oauth_access_token,
- :resource_owner_id => user.id,
- :scopes => %w[read_prefs read_email])
+ good_auth = bearer_authorization_header(user, :scopes => %w[read_prefs])
+ bad_auth = bearer_authorization_header(user, :scopes => %w[])
+ email_auth = bearer_authorization_header(user, :scopes => %w[read_prefs read_email])