diff --git a/src/presentation/http/router/note.test.ts b/src/presentation/http/router/note.test.ts index 9f0a9a5b..4b5ad2b9 100644 --- a/src/presentation/http/router/note.test.ts +++ b/src/presentation/http/router/note.test.ts @@ -282,9 +282,10 @@ describe('Note API', () => { tools: [headerTool, paragraphTool], }); - /** Check if response has createdAt and updatedAt fields */ + /** Check if response has createdAt, updatedAt and creatorId fields */ expect(response?.json().note.createdAt).not.toBeNull(); expect(response?.json().note.updatedAt).not.toBeNull(); + expect(response?.json().note.creatorId).to.be.equal(creator.id); } else { expect(response?.json()).toStrictEqual({ message: expectedMessage, diff --git a/src/presentation/http/schema/Note.ts b/src/presentation/http/schema/Note.ts index 875f9421..3623d6c6 100644 --- a/src/presentation/http/schema/Note.ts +++ b/src/presentation/http/schema/Note.ts @@ -37,5 +37,8 @@ export const NoteSchema = { type: 'string', format: 'date-time', }, + creatorId: { + type: 'number', + }, }, };