test: fix "creates a new revision" test

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2022-11-27 20:57:29 +01:00 committed by David Mehren
parent 231a3fd6bd
commit d3249c6635

View file

@ -199,7 +199,7 @@ describe('RevisionsService', () => {
describe('createRevision', () => { describe('createRevision', () => {
it('creates a new revision', async () => { it('creates a new revision', async () => {
const note = Mock.of<Note>({}); const note = Mock.of<Note>({ publicId: 'test-note' });
const oldContent = 'old content\n'; const oldContent = 'old content\n';
const newContent = 'new content\n'; const newContent = 'new content\n';
@ -216,10 +216,10 @@ describe('RevisionsService', () => {
expect(createdRevision?.content).toBe(newContent); expect(createdRevision?.content).toBe(newContent);
await expect(createdRevision?.note).resolves.toBe(note); await expect(createdRevision?.note).resolves.toBe(note);
expect(createdRevision?.patch).toMatchInlineSnapshot(` expect(createdRevision?.patch).toMatchInlineSnapshot(`
"Index: markdownContent "Index: test-note
=================================================================== ===================================================================
--- markdownContent --- test-note
+++ markdownContent +++ test-note
@@ -1,1 +1,1 @@ @@ -1,1 +1,1 @@
-old content -old content
+new content +new content