0
0
Fork 0

Clean up of RSpec/LetSetup within spec/controllers (#28446)

This commit is contained in:
Matt Jankowski 2023-12-21 04:28:41 -05:00 committed by GitHub
parent c753b1ad35
commit f32d672d2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 17 deletions

View file

@ -63,5 +63,9 @@ describe Oauth::AuthorizedApplicationsController do
it 'removes subscriptions for the application\'s access tokens' do
expect(Web::PushSubscription.where(user: user).count).to eq 0
end
it 'removes the web_push_subscription' do
expect { web_push_subscription.reload }.to raise_error(ActiveRecord::RecordNotFound)
end
end
end

View file

@ -20,5 +20,9 @@ RSpec.describe Oauth::TokensController do
it 'removes web push subscription for token' do
expect(Web::PushSubscription.where(access_token: access_token).count).to eq 0
end
it 'removes the web_push_subscription' do
expect { web_push_subscription.reload }.to raise_error(ActiveRecord::RecordNotFound)
end
end
end