- def test_permissions_oauth
- token = create(:access_token,
- :allow_read_prefs => true,
- :allow_write_api => true,
- :allow_read_gpx => false)
- signed_get permissions_path, :oauth => { :token => token }
+ def test_permissions_oauth2
+ user = create(:user)
+ auth_header = bearer_authorization_header(user, :scopes => %w[read_prefs write_api])
+ get permissions_path, :headers => auth_header