mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 19:01:37 +01:00
Reduce factory creation (73 -> 64) in PublicFeed
spec (#32491)
This commit is contained in:
parent
a72819660a
commit
fbe55a4545
1 changed files with 8 additions and 12 deletions
|
@ -54,24 +54,20 @@ RSpec.describe PublicFeed do
|
||||||
context 'without a viewer' do
|
context 'without a viewer' do
|
||||||
let(:viewer) { nil }
|
let(:viewer) { nil }
|
||||||
|
|
||||||
it 'includes remote instances statuses' do
|
it 'includes remote instances statuses and local statuses' do
|
||||||
expect(subject).to include(remote_status.id)
|
expect(subject)
|
||||||
end
|
.to include(remote_status.id)
|
||||||
|
.and include(local_status.id)
|
||||||
it 'includes local statuses' do
|
|
||||||
expect(subject).to include(local_status.id)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with a viewer' do
|
context 'with a viewer' do
|
||||||
let(:viewer) { Fabricate(:account, username: 'viewer') }
|
let(:viewer) { Fabricate(:account, username: 'viewer') }
|
||||||
|
|
||||||
it 'includes remote instances statuses' do
|
it 'includes remote instances statuses and local statuses' do
|
||||||
expect(subject).to include(remote_status.id)
|
expect(subject)
|
||||||
end
|
.to include(remote_status.id)
|
||||||
|
.and include(local_status.id)
|
||||||
it 'includes local statuses' do
|
|
||||||
expect(subject).to include(local_status.id)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue