diff options
Diffstat (limited to 'spec/controllers/oauth/tokens_controller_spec.rb')
-rw-r--r-- | spec/controllers/oauth/tokens_controller_spec.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/controllers/oauth/tokens_controller_spec.rb b/spec/controllers/oauth/tokens_controller_spec.rb index ba8e367a6..3804e035b 100644 --- a/spec/controllers/oauth/tokens_controller_spec.rb +++ b/spec/controllers/oauth/tokens_controller_spec.rb @@ -5,11 +5,12 @@ require 'rails_helper' RSpec.describe Oauth::TokensController, type: :controller do describe 'POST #revoke' do let!(:user) { Fabricate(:user) } - let!(:access_token) { Fabricate(:accessible_access_token, resource_owner_id: user.id) } + let!(:application) { Fabricate(:application, confidential: false) } + let!(:access_token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, application: application) } let!(:web_push_subscription) { Fabricate(:web_push_subscription, user: user, access_token: access_token) } before do - post :revoke, params: { token: access_token.token } + post :revoke, params: { client_id: application.uid, token: access_token.token } end it 'revokes the token' do |