Fix ArgumentError when loading newer Private Mentions (#25399)

This commit is contained in:
Claire 2023-06-14 08:54:52 +02:00 committed by Tarrien
parent f132cf221a
commit ff6b38a653

View File

@ -52,5 +52,23 @@ RSpec.describe Api::V1::ConversationsController do
end
end
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