Fix RSpec/LetSetup cop in api/v1/timelines/public spec (#28972)

This commit is contained in:
Matt Jankowski 2024-04-02 10:05:02 -04:00 committed by GitHub
parent 54119570e6
commit f87959ab50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,13 +22,15 @@ describe 'Public' do
get '/api/v1/timelines/public', headers: headers, params: params
end
let!(:private_status) { Fabricate(:status, visibility: :private) } # rubocop:disable RSpec/LetSetup
let!(:local_status) { Fabricate(:status, account: Fabricate.build(:account, domain: nil)) }
let!(:remote_status) { Fabricate(:status, account: Fabricate.build(:account, domain: 'example.com')) }
let!(:media_status) { Fabricate(:status, media_attachments: [Fabricate.build(:media_attachment)]) }
let(:params) { {} }
before do
Fabricate(:status, visibility: :private)
end
context 'when the instance allows public preview' do
let(:expected_statuses) { [local_status, remote_status, media_status] }