Fix `RSpec/LetSetup` cop in api/v1/timelines/public spec (#28972)
This commit is contained in:
parent
54119570e6
commit
f87959ab50
|
@ -22,13 +22,15 @@ describe 'Public' do
|
||||||
get '/api/v1/timelines/public', headers: headers, params: params
|
get '/api/v1/timelines/public', headers: headers, params: params
|
||||||
end
|
end
|
||||||
|
|
||||||
let!(:private_status) { Fabricate(:status, visibility: :private) } # rubocop:disable RSpec/LetSetup
|
|
||||||
let!(:local_status) { Fabricate(:status, account: Fabricate.build(:account, domain: nil)) }
|
let!(:local_status) { Fabricate(:status, account: Fabricate.build(:account, domain: nil)) }
|
||||||
let!(:remote_status) { Fabricate(:status, account: Fabricate.build(:account, domain: 'example.com')) }
|
let!(:remote_status) { Fabricate(:status, account: Fabricate.build(:account, domain: 'example.com')) }
|
||||||
let!(:media_status) { Fabricate(:status, media_attachments: [Fabricate.build(:media_attachment)]) }
|
let!(:media_status) { Fabricate(:status, media_attachments: [Fabricate.build(:media_attachment)]) }
|
||||||
|
|
||||||
let(:params) { {} }
|
let(:params) { {} }
|
||||||
|
|
||||||
|
before do
|
||||||
|
Fabricate(:status, visibility: :private)
|
||||||
|
end
|
||||||
|
|
||||||
context 'when the instance allows public preview' do
|
context 'when the instance allows public preview' do
|
||||||
let(:expected_statuses) { [local_status, remote_status, media_status] }
|
let(:expected_statuses) { [local_status, remote_status, media_status] }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue