diff --git a/src/lib/features/project-status/projects-status.e2e.test.ts b/src/lib/features/project-status/projects-status.e2e.test.ts index cf757e20b5f3..dfa9bd93ca31 100644 --- a/src/lib/features/project-status/projects-status.e2e.test.ts +++ b/src/lib/features/project-status/projects-status.e2e.test.ts @@ -79,18 +79,19 @@ test('project insights should return correct count for each day', async () => { const yesterdayEvent = events.find( (e) => e.data.featureName === 'yesterday-event', ); - await db.rawDatabase.raw( - `UPDATE events SET created_at = '2024-11-03' where id = ?`, - [yesterdayEvent?.id], - ); + + const { todayString, yesterdayString } = getCurrentDateStrings(); + + await db.rawDatabase.raw(`UPDATE events SET created_at = ? where id = ?`, [ + yesterdayString, + yesterdayEvent?.id, + ]); const { body } = await app.request .get('/api/admin/projects/default/status') .expect('Content-Type', /json/) .expect(200); - const { todayString, yesterdayString } = getCurrentDateStrings(); - expect(body).toMatchObject({ activityCountByDate: [ { date: yesterdayString, count: 1 },