mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 21:14:03 +00:00
Make with() matrix syntax more clear by using with() multiple times
This commit is contained in:
parent
a5c79d49c3
commit
1f41a8a863
2 changed files with 2 additions and 8 deletions
|
|
@ -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)
|
INSERT INTO posts (text, tenant_id, author_id)
|
||||||
VALUES ('post2', ?, ?)
|
VALUES ('post2', ?, ?)
|
||||||
SQL, [$tenant->id, $authorId]))->toThrow(QueryException::class);
|
SQL, [$tenant->id, $authorId]))->toThrow(QueryException::class);
|
||||||
})->with(
|
})->with([TableRLSManager::class, TraitRLSManager::class])->with([true, false]);
|
||||||
[TableRLSManager::class, TraitRLSManager::class],
|
|
||||||
[true, false]
|
|
||||||
);
|
|
||||||
|
|
|
||||||
|
|
@ -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})"))
|
expect(fn () => DB::statement("INSERT INTO comments (text, post_id) VALUES ('third comment', {$post1->id})"))
|
||||||
->toThrow(QueryException::class);
|
->toThrow(QueryException::class);
|
||||||
})->with(
|
})->with([true, false])->with([true, false]);
|
||||||
[true, false],
|
|
||||||
[true, false],
|
|
||||||
);
|
|
||||||
|
|
||||||
test('trait rls manager generates queries correctly', function() {
|
test('trait rls manager generates queries correctly', function() {
|
||||||
/** @var TraitRLSManager $manager */
|
/** @var TraitRLSManager $manager */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue