1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 15:54:03 +00:00

Make with() matrix syntax more clear by using with() multiple times

This commit is contained in:
lukinovec 2025-01-14 15:55:41 +01:00
parent a5c79d49c3
commit 1f41a8a863
2 changed files with 2 additions and 8 deletions

View file

@ -222,7 +222,4 @@ test('queries will stop working when the tenant session variable is not set', fu
INSERT INTO posts (text, tenant_id, author_id)
VALUES ('post2', ?, ?)
SQL, [$tenant->id, $authorId]))->toThrow(QueryException::class);
})->with(
[TableRLSManager::class, TraitRLSManager::class],
[true, false]
);
})->with([TableRLSManager::class, TraitRLSManager::class])->with([true, false]);

View file

@ -268,10 +268,7 @@ test('queries are correctly scoped using RLS with trait rls manager', function (
expect(fn () => DB::statement("INSERT INTO comments (text, post_id) VALUES ('third comment', {$post1->id})"))
->toThrow(QueryException::class);
})->with(
[true, false],
[true, false],
);
})->with([true, false])->with([true, false]);
test('trait rls manager generates queries correctly', function() {
/** @var TraitRLSManager $manager */