fix(test): assert unknown-column error actually lists the project's real columns

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Dave 2026-09-26 10:05:27 +02:00
parent 05d53e9bb8
commit cf942d67c7

View file

@ -202,6 +202,15 @@ describe("card detail, comments, subtasks, and move", () => {
expect(response.status).toBe(400);
const body = await response.json();
expect(body.error).toContain("Not A Real Column");
// The whole point of this error is that a caller can self-correct from it —
// assert it actually lists a real column name, not just echoes the bad input.
const columns = await admin.collection("columns").getFullList({
filter: `project = "${projectId}"`,
});
for (const column of columns) {
expect(body.error).toContain(column.name);
}
});
it("PATCH move to a working column accepts the card and logs it", async () => {