@davoodmehraban89 / Factor-easy-2 Mirror · read-only / commits / 9f92c70
Fork 0

سامانه صدور فاکتور و حسابداری

Mirrored from https://github.com/davoodmehraban89/Factor-easy.git

Synced Dec 4, 06:45 UTC

test(phase1a): respect real seat-limit trigger in synthetic role matrix fixture

davoodmehraban89 committed Oct 16, 2026 at 16:56 UTC 9f92c70253727dc9a9962b46c8ff186b9b3b8515
1 file changed +4
supabase/tests/phase1a_stage1_sql_behavior.sql
+4
@@ -27,6 +27,10 @@ FROM public.organization_members m CROSS JOIN generate_series(1,2) n WHERE m.use
27 INSERT INTO private.finora_phase1a_guard_modes(organization_id,mode)
28 SELECT organization_id,'enforce' FROM public.organization_members
29 WHERE user_id IN ('aaaa1111-1111-4111-8111-111111111111','bbbb2222-2222-4222-8222-222222222222');
30 +-- Fixture seat capacity is raised ONLY inside this rolling-back local test;
31 +-- the production license and its max_users are never accessed or changed.
32 +UPDATE public.licenses SET max_users=GREATEST(max_users,3)
33 + WHERE organization_id=current_setting('finora_test.org_a')::uuid;
34 -- C joins org A and has commerce:create ONLY; no accounting:approve.
35 INSERT INTO public.organization_members(organization_id,user_id,status,is_owner)
36 VALUES (current_setting('finora_test.org_a')::uuid,'cccc3333-3333-4333-8333-333333333333','active',false);