1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 19:24:02 +00:00
This commit is contained in:
lukinovec 2023-06-15 13:44:39 +02:00
parent 8c87dde85d
commit b0effa60e7

View file

@ -162,7 +162,9 @@ test('global scope is not applied when using rls', function () {
test('queries are correctly scoped using RLS', function() {
// Create rls policies for tables
dump('creating rls policies', tenancy()->getTenantModels());
pest()->artisan('tenants:create-rls-policies');
dump('policies created', DB::select('select * from pg_policies'));
// Create two tenants with postgres users
$tenant = Tenant::create();
@ -174,8 +176,6 @@ test('queries are correctly scoped using RLS', function() {
// Create posts and comments for both tenants
tenancy()->initialize($tenant);
dd(DB::select('select * from pg_policies'));
$post1 = RlsPost::create(['text' => 'first post']);
$post1Comment = $post1->scoped_comments()->create(['text' => 'first comment']);