Skip to content

Commit 31aeb92

Browse files
remove (note parents test): an unecessary test case has been removed
1 parent 47680d6 commit 31aeb92

1 file changed

Lines changed: 0 additions & 52 deletions

File tree

src/presentation/http/router/note.test.ts

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -632,58 +632,6 @@ describe('Note API', () => {
632632
});
633633
});
634634

635-
test('Returns one parent note when the user is not in the parent note\'s team but has note relation', async () => {
636-
/** Create test user */
637-
const user = await global.db.insertUser();
638-
639-
/** Create another user */
640-
const anotherUser = await global.db.insertUser();
641-
642-
/** Create access token for the user */
643-
const accessToken = global.auth(user.id);
644-
645-
/** Create test note - a parent note */
646-
const parentNote = await global.db.insertNote({
647-
creatorId: anotherUser.id,
648-
});
649-
650-
/** Create test note - a child note */
651-
const childNote = await global.db.insertNote({
652-
creatorId: user.id,
653-
});
654-
655-
/** Create test note settings */
656-
await global.db.insertNoteSetting({
657-
noteId: childNote.id,
658-
isPublic: true,
659-
});
660-
661-
/** Create test note relation */
662-
await global.db.insertNoteRelation({
663-
parentId: parentNote.id,
664-
noteId: childNote.id,
665-
});
666-
667-
const response = await global.api?.fakeRequest({
668-
method: 'GET',
669-
headers: {
670-
authorization: `Bearer ${accessToken}`,
671-
},
672-
url: `/note/${childNote.publicId}`,
673-
});
674-
675-
expect(response?.statusCode).toBe(200);
676-
677-
expect(response?.json()).toMatchObject({
678-
parents: [
679-
{
680-
id: parentNote.publicId,
681-
content: parentNote.content,
682-
},
683-
],
684-
});
685-
});
686-
687635
test('Returns empty array in case where there is no relation exist for the note', async () => {
688636
/** Create test user */
689637
const user = await global.db.insertUser();

0 commit comments

Comments
 (0)