mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-09 09:12:19 +00:00
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
|
||||
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] }
|
||||
|
||||
|
|
Loading…
Reference in a new issue