Skip to content

Commit

Permalink
tests: publicfeed tests using less than, not less than or equal to. a…
Browse files Browse the repository at this point in the history
…dd small offset to max id
  • Loading branch information
sneakers-the-rat committed Jan 25, 2024
1 parent 3e24c45 commit aab3d4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/models/public_feed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
end

# before a second boost, the second page should still include the original boost
second_page = described_class.new(nil, with_reblogs: true).get(20, boost.id, status.id).map(&:id)
second_page = described_class.new(nil, with_reblogs: true).get(20, boost.id + 1000, status.id).map(&:id)
expect(second_page).to include(boost.id)

# after a second boost, the second page should no longer include the original boost
second_boost = Fabricate(:status, reblog_of_id: status.id, account: booster)
second_page = described_class.new(nil, with_reblogs: true).get(20, boost.id, status.id).map(&:id)
second_page = described_class.new(nil, with_reblogs: true).get(20, boost.id + 1000, status.id).map(&:id)

expect(subject).to include(second_boost.id)
expect(second_page).to_not include(boost.id)
Expand Down

0 comments on commit aab3d4c

Please sign in to comment.