From bc3f68b46ad69520ebfc94a4d9a8232e27d8ecdd Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 2 Jan 2026 11:52:22 +0100 Subject: [PATCH] Fix date-related wrapstodon test failures (#37362) --- spec/requests/api/v1/annual_reports_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/requests/api/v1/annual_reports_spec.rb b/spec/requests/api/v1/annual_reports_spec.rb index e79309145e3..ea6e738fea3 100644 --- a/spec/requests/api/v1/annual_reports_spec.rb +++ b/spec/requests/api/v1/annual_reports_spec.rb @@ -107,7 +107,8 @@ RSpec.describe 'API V1 Annual Reports' do before do travel_to Time.utc(2025, 12, 20) - status = Fabricate(:status, visibility: :public, account: user.account) + # Define the ID manually as it is otherwise handled by the database, which is not affected by `travel_to` + status = Fabricate(:status, visibility: :public, account: user.account, id: Mastodon::Snowflake.id_at(Time.now.utc)) status.tags << Fabricate(:tag) end @@ -129,7 +130,8 @@ RSpec.describe 'API V1 Annual Reports' do before do travel_to Time.utc(2025, 6, 20) - status = Fabricate(:status, visibility: :public, account: user.account) + # Define the ID manually as it is otherwise handled by the database, which is not affected by `travel_to` + status = Fabricate(:status, visibility: :public, account: user.account, id: Mastodon::Snowflake.id_at(Time.now.utc)) status.tags << Fabricate(:tag) end