Say the gate rule once, and key the example's shifts by the identifier it scopes on
CI / full-gate (push) Successful in 3m4s

This commit is contained in:
2026-09-02 08:50:44 +02:00
parent bf146c07e7
commit 5d1e8f2309
5 changed files with 8 additions and 13 deletions
@@ -182,8 +182,6 @@ test("my shifts asks the upstream for the visitor's own rows, and names them in
const upstream = fakeUpstream({ list: async (opts) => { asked = opts; return [mine]; } });
const r = asView(await myShifts(upstream)(fakeCtx({ url: "http://localhost/scheduling/mine", user })));
assert.equal(r.view, "mine");
// The ownership rule is the upstream's: the page asks for one person's rows rather than filtering
// everyone's here, so a real backend never hands this handler another visitor's shifts.
assert.deepEqual(asked, { assignee: "Blair.Mora@example.test" });
const table = r.data["table"] as { emptyText: string; rows: { name: string }[] };
assert.deepEqual(table.rows.map((row) => row.name), ["Evening on-call"]);