0
0
Fork 0

Refactor how public and tag timelines are queried (#14728)

This commit is contained in:
Eugen Rochko 2020-09-07 11:02:04 +02:00 committed by GitHub
parent a6121a159c
commit e8bc187845
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 429 additions and 378 deletions

View file

@ -28,10 +28,10 @@ RSpec.describe FanOutOnWriteService, type: :service do
end
it 'delivers status to hashtag' do
expect(Tag.find_by!(name: 'test').statuses.pluck(:id)).to include status.id
expect(TagFeed.new(Tag.find_by(name: 'test'), alice).get(20).map(&:id)).to include status.id
end
it 'delivers status to public timeline' do
expect(Status.as_public_timeline(alice).map(&:id)).to include status.id
expect(PublicFeed.new(alice).get(20).map(&:id)).to include status.id
end
end