mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-28 19:10:57 -05: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
|
||||
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());
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue