From f2331c607f5d7a0ec9798c04e75a8806c243eac5 Mon Sep 17 00:00:00 2001 From: Ivan Skvorcov Date: Tue, 5 Dec 2023 19:18:18 +0300 Subject: [PATCH] tests fix --- src/presentation/http/router/note.test.ts | 1 + src/presentation/http/router/noteSettings.test.ts | 4 +++- src/tests/test-data/notes-settings.json | 12 ++++++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/presentation/http/router/note.test.ts b/src/presentation/http/router/note.test.ts index 37ecadd7..a12a2841 100644 --- a/src/presentation/http/router/note.test.ts +++ b/src/presentation/http/router/note.test.ts @@ -21,6 +21,7 @@ describe('Note API', () => { 'isPublic': true, 'id': 1, 'noteId': 1, + 'invitationHash': 'Hzh2hy4igf', }, }, 'accessRights': { diff --git a/src/presentation/http/router/noteSettings.test.ts b/src/presentation/http/router/noteSettings.test.ts index d50fbdb6..b09df15e 100644 --- a/src/presentation/http/router/noteSettings.test.ts +++ b/src/presentation/http/router/noteSettings.test.ts @@ -14,6 +14,7 @@ describe('NoteSettings API', () => { 'isPublic': true, 'id': 2, 'noteId': 2, + 'invitationHash': 'E2zRXv3cp-', }; const response = await global.api?.fakeRequest({ @@ -201,6 +202,7 @@ describe('NoteSettings API', () => { 'noteId': 53, 'customHostname': 'codex.so', 'isPublic': false, + 'invitationHash': 'FfAwyaR80C', }; const response = await global.api?.fakeRequest({ @@ -279,4 +281,4 @@ describe('NoteSettings API', () => { test.todo('Return 403 when user authorized, but not member of the team'); }); -}); \ No newline at end of file +}); diff --git a/src/tests/test-data/notes-settings.json b/src/tests/test-data/notes-settings.json index c44f4111..4d9fa4ad 100644 --- a/src/tests/test-data/notes-settings.json +++ b/src/tests/test-data/notes-settings.json @@ -3,27 +3,31 @@ "id": 1, "note_id": 1, "custom_hostname": "codex.so", - "is_public": true + "is_public": true, + "invitation_hash": "Hzh2hy4igf" }, { "id": 2, "note_id": 2, "custom_hostname": "codex.so", - "is_public": true + "is_public": true, + "invitation_hash": "E2zRXv3cp-" }, { "id": 3, "note_id": 3, "custom_hostname": "codex.so", - "is_public": false + "is_public": false, + "invitation_hash": "Lw5kIwwo4_" }, { "id": 53, "note_id": 53, "custom_hostname": "codex.so", - "is_public": true + "is_public": true, + "invitation_hash": "FfAwyaR80C" } ]