test: cover movePage server-side cycle guard (#67) #102
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR #101 (commit
212bcea4, closes #67) added a server-side cycle guard inmovePage— apps/server/src/core/page/services/page.service.ts (~L991-1007) — to stop MCP/REST/agent callers bypassing the client-side check.Gap: no spec covers either branch.
page.service.spec.tsis ashould be definedsmoke test only; nothing referencesmovePage/"own subtree".Needed (would fail on pre-fix code): unit test mocking
pageRepo.findById+getPageBreadCrumbs:parentPageId === pageId) throwsBadRequestExceptionbefore anyupdatePage;pageIdthrows;updatePage.Found in code review of PR #101.