@davoodmehraban89 / Factor-easy / commits / 63a9202
Fork 0

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

test: add failing C8 runtime transaction contract

davoodmehraban89 committed Oct 1, 2026 at 21:12 UTC 63a92028449fc2f95855fd70b1aee72f22235f79
1 file changed +17
supabase/tests/office_c8_runtime.sql new
+17
@@ -0,0 +1,17 @@
1 +-- Office C8 Task 2 RED contract: attach / transition / read runtime.
2 +-- This intentionally fails until the Task 2 migration exists.
3 +
4 +begin;
5 +
6 +do $$
7 +begin
8 + if to_regclass('private.office_workflow_instances') is null then raise exception 'C8 runtime instances table missing'; end if;
9 + if to_regclass('private.office_workflow_events') is null then raise exception 'C8 runtime events table missing'; end if;
10 + if to_regprocedure('public.office_workflow_attach(uuid,text,text,integer,uuid)') is null then raise exception 'C8 attach RPC missing'; end if;
11 + if to_regprocedure('public.office_workflow_transition(uuid,uuid,text,bigint,uuid,text)') is null then raise exception 'C8 transition RPC missing'; end if;
12 + if to_regprocedure('public.office_workflow_read(uuid,text,bigint,integer)') is null then raise exception 'C8 read RPC missing'; end if;
13 +end $$;
14 +
15 +-- Behavioral fixtures and race assertions are added against the disposable PostgreSQL
16 +-- harness before Task 2 production DDL is eligible for deployment.
17 +rollback;