mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Reduce factory creation (73 -> 64) in PublicFeed
spec (#32491)
This commit is contained in:
parent
b1c10969ac
commit
d1d2278e70
@ -54,24 +54,20 @@ RSpec.describe PublicFeed do
|
||||
context 'without a viewer' do
|
||||
let(:viewer) { nil }
|
||||
|
||||
it 'includes remote instances statuses' do
|
||||
expect(subject).to include(remote_status.id)
|
||||
end
|
||||
|
||||
it 'includes local statuses' do
|
||||
expect(subject).to include(local_status.id)
|
||||
it 'includes remote instances statuses and local statuses' do
|
||||
expect(subject)
|
||||
.to include(remote_status.id)
|
||||
.and include(local_status.id)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with a viewer' do
|
||||
let(:viewer) { Fabricate(:account, username: 'viewer') }
|
||||
|
||||
it 'includes remote instances statuses' do
|
||||
expect(subject).to include(remote_status.id)
|
||||
end
|
||||
|
||||
it 'includes local statuses' do
|
||||
expect(subject).to include(local_status.id)
|
||||
it 'includes remote instances statuses and local statuses' do
|
||||
expect(subject)
|
||||
.to include(remote_status.id)
|
||||
.and include(local_status.id)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user