From b81761fcd0e3f6726dec7296777e40bd3a4c015a Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sun, 21 Aug 2022 20:07:22 +0200 Subject: [PATCH] test(public-api): fix test for get note metadata call Signed-off-by: Philip Molares --- test/public-api/notes.e2e-spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/public-api/notes.e2e-spec.ts b/test/public-api/notes.e2e-spec.ts index 43877548a..43e264ebe 100644 --- a/test/public-api/notes.e2e-spec.ts +++ b/test/public-api/notes.e2e-spec.ts @@ -316,6 +316,8 @@ describe('Notes', () => { ); // save the creation time const createDate = note.createdAt; + const revisions = await note.revisions; + const updatedDate = revisions[revisions.length - 1].createdAt; // wait one second await new Promise((r) => setTimeout(r, 1000)); // update the note @@ -324,7 +326,7 @@ describe('Notes', () => { .get('/api/v2/notes/test5a/metadata') .expect(200); expect(metadata.body.createdAt).toEqual(createDate.toISOString()); - expect(metadata.body.updateTime).not.toEqual(createDate.toISOString()); + expect(metadata.body.updatedAt).not.toEqual(updatedDate.toISOString()); }); });