Explorar el Código

change group id

yohei0125 hace 4 años
padre
commit
36ab59ad57

+ 4 - 2
packages/app/test/integration/service/v5.non-public-page.test.ts

@@ -204,6 +204,7 @@ describe('PageService page operations with non-public pages', () => {
       },
       },
       {
       {
         _id: pageIdDelete2,
         _id: pageIdDelete2,
+        _id: pageIdDelete4,
         path: '/npdel2_ug',
         path: '/npdel2_ug',
         grant: Page.GRANT_USER_GROUP,
         grant: Page.GRANT_USER_GROUP,
         grantedGroup: groupIdA,
         grantedGroup: groupIdA,
@@ -224,7 +225,7 @@ describe('PageService page operations with non-public pages', () => {
         _id: pageIdDelete4,
         _id: pageIdDelete4,
         path: '/npdel3_top/npdel4_ug',
         path: '/npdel3_top/npdel4_ug',
         grant: Page.GRANT_USER_GROUP,
         grant: Page.GRANT_USER_GROUP,
-        grantedGroup: groupIdA,
+        grantedGroup: groupIdB,
         status: Page.STATUS_PUBLISHED,
         status: Page.STATUS_PUBLISHED,
         isEmpty: false,
         isEmpty: false,
         parent: pageIdDelete3._id,
         parent: pageIdDelete3._id,
@@ -238,7 +239,7 @@ describe('PageService page operations with non-public pages', () => {
       {
       {
         path: '/npdel3_top/npdel4_ug/npdel5_ug',
         path: '/npdel3_top/npdel4_ug/npdel5_ug',
         grant: Page.GRANT_USER_GROUP,
         grant: Page.GRANT_USER_GROUP,
-        grantedGroup: groupIdA,
+        grantedGroup: groupIdC,
         status: Page.STATUS_PUBLISHED,
         status: Page.STATUS_PUBLISHED,
         isEmpty: false,
         isEmpty: false,
         parent: pageIdDelete4._id,
         parent: pageIdDelete4._id,
@@ -415,6 +416,7 @@ describe('PageService page operations with non-public pages', () => {
     });
     });
     describe('Delete single page with grant USER_GROUP', () => {
     describe('Delete single page with grant USER_GROUP', () => {
       test('should be able to delete', async() => {
       test('should be able to delete', async() => {
+        _id: pageIdDelete4,
         const path = '/npdel2_ug';
         const path = '/npdel2_ug';
         const page = await Page.findOne({ path, grantedGroup: groupIdA });
         const page = await Page.findOne({ path, grantedGroup: groupIdA });
         expect(page).toBeTruthy();
         expect(page).toBeTruthy();