Revert tests

This commit is contained in:
Claire 2025-11-25 17:45:11 +01:00
parent 815f5ccd8f
commit 35c60709c3

View File

@ -15,26 +15,6 @@ RSpec.describe Mastodon::CLI::Statuses do
describe '#remove', use_transactional_tests: false do
let(:action) { :remove }
let(:local_account) { Fabricate(:account) }
let(:remote_account) { Fabricate(:account, domain: 'example.com') }
let(:followed_remote_account) { Fabricate(:account, domain: 'example.com') }
let!(:local_status) { Fabricate(:status, created_at: 1.year.ago) }
let!(:irrelevant_status) { Fabricate(:status, account: remote_account, created_at: 1.year.ago) }
let!(:followed_status) { Fabricate(:status, account: followed_remote_account, created_at: 1.year.ago) }
let!(:status_with_local_reply) { Fabricate(:status, account: remote_account, created_at: 1.year.ago) }
let!(:local_reply) { Fabricate(:status, thread: status_with_local_reply, created_at: 1.year.ago) }
let!(:irrelevant_quote) { Fabricate(:status, account: remote_account, created_at: 1.year.ago) }
let!(:quote_of_local) { Fabricate(:status, account: remote_account, created_at: 1.year.ago) }
let!(:quoted_by_local) { Fabricate(:status, account: remote_account, created_at: 1.year.ago) }
let!(:local_quote) { Fabricate(:status, created_at: 1.year.ago) }
before do
local_account.follow!(followed_remote_account)
Fabricate(:quote, status: irrelevant_quote, quoted_status: irrelevant_status, state: :accepted)
Fabricate(:quote, status: quote_of_local, quoted_status: local_status, state: :accepted)
Fabricate(:quote, status: local_quote, quoted_status: quoted_by_local, state: :accepted)
end
context 'with small batch size' do
let(:options) { { batch_size: 0 } }
@ -48,10 +28,6 @@ RSpec.describe Mastodon::CLI::Statuses do
it 'removes unreferenced statuses' do
expect { subject }
.to output_results('Done after')
expect(Status.all)
.to include(local_status, followed_status, local_reply, status_with_local_reply, quote_of_local, quoted_by_local, local_quote)
.and not_include(irrelevant_status, irrelevant_quote)
end
end
end