0
0
Fork 0

Fix test-related issues (#17888)

* Remove obsolete RSS::Serializer test

Since #17828, RSS::Serializer no longer has specific code for deleted statuses,
but it is never called on deleted statuses anyway.

* Rename erroneously-named test files

* Fix failing test

* Fix test deprecation warnings

* Update CircleCI Ruby orb

1.4.0 has a bug that does not match all the test files due to incorrect
globbing
This commit is contained in:
Claire 2022-03-28 12:43:58 +02:00 committed by GitHub
parent 56edc6552f
commit 30658924a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 70 additions and 90 deletions

View file

@ -23,12 +23,10 @@ RSpec.describe DeleteAccountService, type: :service do
let!(:account_note) { Fabricate(:account_note, account: account) }
subject do
-> { described_class.new.call(account) }
end
subject { described_class.new.call(account) }
it 'deletes associated owned records' do
is_expected.to change {
expect { subject }.to change {
[
account.statuses,
account.media_attachments,
@ -43,7 +41,7 @@ RSpec.describe DeleteAccountService, type: :service do
end
it 'deletes associated target records' do
is_expected.to change {
expect { subject }.to change {
[
AccountPin.where(target_account: account),
].map(&:count)
@ -51,7 +49,7 @@ RSpec.describe DeleteAccountService, type: :service do
end
it 'deletes associated target notifications' do
is_expected.to change {
expect { subject }.to change {
[
'poll', 'favourite', 'status', 'mention', 'follow'
].map { |type| Notification.where(type: type).count }
@ -73,7 +71,7 @@ RSpec.describe DeleteAccountService, type: :service do
let!(:local_follower) { Fabricate(:account) }
it 'sends a delete actor activity to all known inboxes' do
subject.call
subject
expect(a_request(:post, "https://alice.com/inbox")).to have_been_made.once
expect(a_request(:post, "https://bob.com/inbox")).to have_been_made.once
end
@ -91,7 +89,7 @@ RSpec.describe DeleteAccountService, type: :service do
let!(:local_follower) { Fabricate(:account) }
it 'sends a reject follow to follower inboxes' do
subject.call
subject
expect(a_request(:post, account.inbox_url)).to have_been_made.once
end
end