0
0
Fork 0

Wrong count in response when removing favourite/reblog (#24365)

Co-authored-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Christian Schmidt 2023-07-19 09:02:30 +02:00 committed by GitHub
parent 6edd404482
commit 4c18928a93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 73 additions and 19 deletions

View file

@ -77,6 +77,12 @@ RSpec.describe 'Favourites' do
let(:status) { Fabricate(:status) }
around do |example|
Sidekiq::Testing.fake! do
example.run
end
end
it_behaves_like 'forbidden for wrong scope', 'read read:favourites'
context 'with public status' do
@ -88,6 +94,9 @@ RSpec.describe 'Favourites' do
subject
expect(response).to have_http_status(200)
expect(user.account.favourited?(status)).to be true
UnfavouriteWorker.drain
expect(user.account.favourited?(status)).to be false
end
@ -110,6 +119,9 @@ RSpec.describe 'Favourites' do
subject
expect(response).to have_http_status(200)
expect(user.account.favourited?(status)).to be true
UnfavouriteWorker.drain
expect(user.account.favourited?(status)).to be false
end