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

pull/29829/head
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
1 changed files with 4 additions and 2 deletions

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] }