- token = create(:oauth_access_token,
- :resource_owner_id => user.id,
- :scopes => %w[read_prefs write_api])
- get permissions_path, :headers => bearer_authorization_header(token.token)
+ auth_header = bearer_authorization_header(user, :scopes => %w[read_prefs write_api])
+ get permissions_path, :headers => auth_header