diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-08-10 15:22:04 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-08-10 16:49:06 +0200 |
commit | 03afc365d530e6d57754ae9dbbdbd0c56431ee02 (patch) | |
tree | 58ecbe9865b1cfcca6b08da53e8bb6c5e01e5c9a /spec | |
parent | 7d1dd59496189d7b6e81585a01aaaae6fd45a737 (diff) |
Introduce OAuth scopes for bookmarks
Diffstat (limited to 'spec')
-rw-r--r-- | spec/controllers/api/v1/bookmarks_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/api/v1/bookmarks_controller_spec.rb b/spec/controllers/api/v1/bookmarks_controller_spec.rb index 26130e71b..79601b6e6 100644 --- a/spec/controllers/api/v1/bookmarks_controller_spec.rb +++ b/spec/controllers/api/v1/bookmarks_controller_spec.rb @@ -4,7 +4,7 @@ RSpec.describe Api::V1::BookmarksController, type: :controller do render_views let(:user) { Fabricate(:user) } - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read') } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read:bookmarks') } describe 'GET #index' do context 'without token' do diff --git a/spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb b/spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb index d881e22ed..b79853718 100644 --- a/spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb +++ b/spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb @@ -7,7 +7,7 @@ describe Api::V1::Statuses::BookmarksController do let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) } let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write', application: app) } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write:bookmarks', application: app) } context 'with an oauth token' do before do |