Skip to content

Commit 1d74350

Browse files
committed
test(server): a project move drops the bound thread, as thread modes decided
1 parent 03dde08 commit 1d74350

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

‎apps/server/src/scheduledTasks/ScheduledTaskService.test.ts‎

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -844,19 +844,13 @@ it.effect("checks a task's destination thread only when the destination changes"
844844
assert.equal(moved.task.id, created.task.id);
845845
assert.equal(moved.task.threadId, destination);
846846

847-
// A task whose thread was archived later stays editable, but its project cannot move.
847+
// A task whose thread was archived later stays editable; moving its project leaves the thread.
848848
yield* Ref.update(shells, (all) =>
849849
new Map(all).set(destination, threadShell(project, { archivedAt })),
850850
);
851851
yield* save(destination);
852-
const projectChange = yield* save(destination, otherProject).pipe(Effect.flip);
853-
assert.equal(
854-
projectChange.message,
855-
"That thread is archived. Unarchive it or pick another destination.",
856-
);
857-
858-
const unbound = yield* save(null);
859-
assert.isNull(unbound.task.threadId);
852+
const projectChange = yield* save(destination, otherProject);
853+
assert.isNull(projectChange.task.threadId);
860854
}).pipe(Effect.provide(layer));
861855
}).pipe(Effect.provide(SqlitePersistence.layerMemory)),
862856
);

0 commit comments

Comments
 (0)