yohei0125 4 лет назад
Родитель
Сommit
edfb045eb5
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      packages/app/test/integration/service/v5.page.test.ts

+ 5 - 1
packages/app/test/integration/service/v5.page.test.ts

@@ -207,6 +207,10 @@ describe('Test page service methods', () => {
       expect(page3.parent).toStrictEqual(page2._id);
       expect(page4.parent).toStrictEqual(page3._id);
     });
-    test('it should fail when PageOperation is not found', async() => {});
+    test('it should fail and throw error if PageOperation is not Found', async() => {
+      const pageOpId = new mongoose.Types.ObjectId(); // not exist in DB
+      await expect(restartPageRenameOperation(pageOpId))
+        .rejects.toThrow(new Error('PageRenameOperation is not executable'));
+    });
   });
 });