yohei0125 4 лет назад
Родитель
Сommit
95668edad3
1 измененных файлов с 19 добавлено и 7 удалено
  1. 19 7
      packages/app/test/integration/service/v5.migration.test.js

+ 19 - 7
packages/app/test/integration/service/v5.migration.test.js

@@ -69,6 +69,25 @@ describe('V5 page migration', () => {
         parent: groupIdB,
       },
     ]);
+
+    await UserGroupRelation.insertMany([
+      {
+        relatedGroup: groupIdIsolate,
+        relatedUser: testUser1._id,
+      },
+      {
+        relatedGroup: groupIdA,
+        relatedUser: testUser1._id,
+      },
+      {
+        relatedGroup: groupIdB,
+        relatedUser: testUser1._id,
+      },
+      {
+        relatedGroup: groupIdC,
+        relatedUser: testUser1._id,
+      },
+    ]);
   });
 
   describe('normalizeParentRecursivelyByPages()', () => {
@@ -254,13 +273,6 @@ describe('V5 page migration', () => {
 
     beforeAll(async() => {
 
-      await UserGroupRelation.insertMany([
-        {
-          relatedGroup: groupIdIsolate,
-          relatedUser: testUser1._id,
-        },
-      ]);
-
       await Page.insertMany([
         {
           _id: pageId1,