diff --git a/src/presentation/http/router/note.test.ts b/src/presentation/http/router/note.test.ts index 8488d95d..139d7d34 100644 --- a/src/presentation/http/router/note.test.ts +++ b/src/presentation/http/router/note.test.ts @@ -568,7 +568,7 @@ describe('Note API', () => { }); }); - test('Returns two note parents in case when the note parents IDs relations are provided in a different order than expected', async () => { + test('Returns note parents in correct order in case when parents created in a non-linear order', async () => { /** Create test user */ const user = await global.db.insertUser(); diff --git a/src/repository/storage/postgres/orm/sequelize/note.ts b/src/repository/storage/postgres/orm/sequelize/note.ts index f2c329d9..c45b3be5 100644 --- a/src/repository/storage/postgres/orm/sequelize/note.ts +++ b/src/repository/storage/postgres/orm/sequelize/note.ts @@ -325,7 +325,7 @@ export default class NoteSequelizeStorage { }; /** - * Get all notes based on their ids + * Get all notes based on their ids in the same order of passed ids * @param noteIds - list of note ids */ public async getNotesByIds(noteIds: NoteInternalId[]): Promise {