From f7a661af631790b0e9bee23deb6e6ccfb07ab474 Mon Sep 17 00:00:00 2001 From: Vyacheslav Chernyshev <81693471+slaveeks@users.noreply.github.com> Date: Wed, 10 Jan 2024 21:43:52 +0300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Tatiana Fomina Co-authored-by: Peter Savchenko --- src/domain/service/noteSettings.ts | 2 +- src/presentation/http/router/join.test.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/domain/service/noteSettings.ts b/src/domain/service/noteSettings.ts index 6f4e41af..18a3c32d 100644 --- a/src/domain/service/noteSettings.ts +++ b/src/domain/service/noteSettings.ts @@ -41,7 +41,7 @@ export default class NoteSettingsService { const noteSettings = await this.noteSettingsRepository.getNoteSettingsByInvitationHash(invitationHash); /** - * Check does invitation hash is valid + * Check if invitation hash is valid */ if (noteSettings === null) { throw new Error(`Wrong invitation`); diff --git a/src/presentation/http/router/join.test.ts b/src/presentation/http/router/join.test.ts index b5354e0d..8345d47a 100644 --- a/src/presentation/http/router/join.test.ts +++ b/src/presentation/http/router/join.test.ts @@ -41,6 +41,7 @@ describe('Join API', () => { message: `Note with invitation ${hash} does not exists`, }); }); + test('Returns 200 when user is added to the team', async () => { const userId = 1; const noteId = 1;