Explorar o código

Added conditions

Taichi Masuyama %!s(int64=4) %!d(string=hai) anos
pai
achega
1d11d0bb3a
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      packages/app/test/integration/models/v5.page.test.js

+ 2 - 2
packages/app/test/integration/models/v5.page.test.js

@@ -884,8 +884,8 @@ describe('Page', () => {
     });
     test('should find parent while NOT creating unnecessary empty pages with all v4 public pages', async() => {
       // All pages does not have parent (v4 schema)
-      const _pageA = await Page.findOne({ path: '/get_parent_A', grant: Page.GRANT_PUBLIC, isEmpty: false });
-      const _pageAB = await Page.findOne({ path: '/get_parent_A/get_parent_B', grant: Page.GRANT_PUBLIC, isEmpty: false });
+      const _pageA = await Page.findOne({ path: '/get_parent_A', grant: Page.GRANT_PUBLIC, isEmpty: false, parent: null });
+      const _pageAB = await Page.findOne({ path: '/get_parent_A/get_parent_B', grant: Page.GRANT_PUBLIC, isEmpty: false, parent: null });
       const _emptyA = await Page.findOne({ path: '/get_parent_A', grant: Page.GRANT_PUBLIC, isEmpty: true });
       const _emptyAB = await Page.findOne({ path: '/get_parent_A/get_parent_B', grant: Page.GRANT_PUBLIC, isEmpty: true });