diff --git a/src/test/e2e/api/admin/project/project.health.e2e.test.ts b/src/test/e2e/api/admin/project/project.health.e2e.test.ts index a10daed317..f303329e12 100644 --- a/src/test/e2e/api/admin/project/project.health.e2e.test.ts +++ b/src/test/e2e/api/admin/project/project.health.e2e.test.ts @@ -302,3 +302,16 @@ test('Sorts environments correctly if sort order is equal', async () => { expect(feature.environments[1].name).toBe(envTwo); }); }); + +test('Update update_at when setHealth runs', async () => { + await app.services.projectHealthService.setHealthRating(); + await app.request + .get('/api/admin/projects/default/health-report') + .expect(200) + .expect('Content-Type', /json/) + .expect((res) => { + let now = new Date().getTime(); + let updatedAt = new Date(res.body.updatedAt).getTime(); + expect(now - updatedAt).toBeLessThan(5000); + }); +}); diff --git a/src/test/e2e/stores/project-store.e2e.test.ts b/src/test/e2e/stores/project-store.e2e.test.ts index 48d2a8f7d9..fa665769e4 100644 --- a/src/test/e2e/stores/project-store.e2e.test.ts +++ b/src/test/e2e/stores/project-store.e2e.test.ts @@ -39,6 +39,7 @@ test('should create new project', async () => { expect(project.name).toEqual(ret.name); expect(project.description).toEqual(ret.description); expect(ret.createdAt).toBeTruthy(); + expect(ret.updatedAt).toBeTruthy(); expect(exists).toBe(true); });