0
0
Fork 0

Fix ArgumentError when loading newer Private Mentions (#25399)

This commit is contained in:
Claire 2023-06-14 08:54:52 +02:00 committed by GitHub
parent bca649ba79
commit ec59166844
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 11 deletions

View file

@ -35,5 +35,23 @@ RSpec.describe Api::V1::ConversationsController do
json = body_as_json
expect(json.size).to eq 1
end
context 'with since_id' do
context 'when requesting old posts' do
it 'returns conversations' do
get :index, params: { since_id: Mastodon::Snowflake.id_at(1.hour.ago, with_random: false) }
json = body_as_json
expect(json.size).to eq 1
end
end
context 'when requesting posts in the future' do
it 'returns no conversation' do
get :index, params: { since_id: Mastodon::Snowflake.id_at(1.hour.from_now, with_random: false) }
json = body_as_json
expect(json.size).to eq 0
end
end
end
end
end