Deleting a collection should detach associated drafts from it (#5082)

Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
Apoorv Mishra
2023-04-24 00:50:44 +05:30
committed by GitHub
parent 7250c0ed64
commit 86062f396d
39 changed files with 363 additions and 112 deletions

View File

@@ -18,7 +18,7 @@ describe("documents.publish", () => {
await processor.perform({
name: "documents.publish",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
data: { title: document.title },
@@ -46,7 +46,7 @@ describe("documents.publish", () => {
await processor.perform({
name: "documents.publish",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
data: { title: document.title },
@@ -72,7 +72,7 @@ describe("documents.update", () => {
await processor.perform({
name: "documents.update",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
createdAt: new Date().toISOString(),
@@ -100,7 +100,7 @@ describe("documents.update", () => {
await processor.perform({
name: "documents.update",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
createdAt: new Date().toISOString(),
@@ -125,7 +125,7 @@ describe("documents.update", () => {
await processor.perform({
name: "documents.update",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
createdAt: new Date().toISOString(),
@@ -153,7 +153,7 @@ describe("documents.update", () => {
await processor.perform({
name: "documents.publish",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
data: { title: document.title },
@@ -167,7 +167,7 @@ describe("documents.update", () => {
await processor.perform({
name: "documents.update",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
createdAt: new Date().toISOString(),
@@ -195,7 +195,7 @@ describe("documents.delete", () => {
await processor.perform({
name: "documents.update",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
createdAt: new Date().toISOString(),
@@ -206,7 +206,7 @@ describe("documents.delete", () => {
await processor.perform({
name: "documents.delete",
documentId: document.id,
collectionId: document.collectionId,
collectionId: document.collectionId!,
teamId: document.teamId,
actorId: document.createdById,
data: { title: document.title },