mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
test(public-api): fix test for get note metadata call
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
6293bf72b2
commit
b81761fcd0
1 changed files with 3 additions and 1 deletions
|
@ -316,6 +316,8 @@ describe('Notes', () => {
|
||||||
);
|
);
|
||||||
// save the creation time
|
// save the creation time
|
||||||
const createDate = note.createdAt;
|
const createDate = note.createdAt;
|
||||||
|
const revisions = await note.revisions;
|
||||||
|
const updatedDate = revisions[revisions.length - 1].createdAt;
|
||||||
// wait one second
|
// wait one second
|
||||||
await new Promise((r) => setTimeout(r, 1000));
|
await new Promise((r) => setTimeout(r, 1000));
|
||||||
// update the note
|
// update the note
|
||||||
|
@ -324,7 +326,7 @@ describe('Notes', () => {
|
||||||
.get('/api/v2/notes/test5a/metadata')
|
.get('/api/v2/notes/test5a/metadata')
|
||||||
.expect(200);
|
.expect(200);
|
||||||
expect(metadata.body.createdAt).toEqual(createDate.toISOString());
|
expect(metadata.body.createdAt).toEqual(createDate.toISOString());
|
||||||
expect(metadata.body.updateTime).not.toEqual(createDate.toISOString());
|
expect(metadata.body.updatedAt).not.toEqual(updatedDate.toISOString());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue