Skip to content

Commit 4e6abca

Browse files
committed
wip: make the union case discriminating (third organization)
1 parent 8adeba8 commit 4e6abca

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

packages/drivers/driver-memory/src/memory-tenant-scope.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,14 @@ describe('#16589 — the in-memory driver honours DriverOptions.tenantId', () =>
210210
it('widens to the whole membership set instead of ANDing the active org', async () => {
211211
const driver = makeDriver();
212212
const object = await seed(driver);
213+
// ⚠️ A THIRD organization, outside the membership set, and it is
214+
// load-bearing: with only A and B seeded their union IS the whole table,
215+
// so this case answered the same rows whether the union widened the scope
216+
// or no scope ran at all. Measured — under the two-leg ablation that
217+
// disables the chokepoint it stayed GREEN, alone among the scoped cases.
218+
// `org_c` is what makes "widened" and "disabled" different answers.
219+
await driver.create(object, { id: 'c1', name: 'C one', organization_id: 'org_c' });
220+
213221
const rows = await driver.find(object, {}, { tenantId: ORG_A, tenantIds: [ORG_A, ORG_B] });
214222
expect(ids(rows)).toEqual(['a1', 'a2', 'b1', 'g1']);
215223
});

0 commit comments

Comments
 (0)