From a8f0b15e348a151ec778462e7239b6f7ce16323d Mon Sep 17 00:00:00 2001 From: Claude Fable 5 Date: Thu, 2 Jul 2026 17:34:25 -0700 Subject: [PATCH] =?UTF-8?q?test(cloud):=20mock=20ad=20accounts=20as=20acti?= =?UTF-8?q?ve=20in=20credit-reconciliation=20suite=20=E2=80=94=20un-red=20?= =?UTF-8?q?develop=20after=20#11619=20gate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #11619 gated updateCampaign on account.status === "active" but did not update the ad-campaign-credit-reconciliation mocks, which stub adAccountsRepository.findById without a status field. Since that merge, 7 of the suite's 13 tests fail on develop with 'Ad account is not active (status: undefined)' before ever reaching the credit logic under test. Mark both beforeEach account mocks active so the suite exercises hold reconciliation again; the gate itself stays covered by ad-account-approval.test.ts (15 tests). Before: 6 pass / 7 fail. After: 13 pass / 0 fail (48/0 across the four ad suites). Co-Authored-By: Claude Fable 5 --- .../__tests__/ad-campaign-credit-reconciliation.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cloud/shared/src/lib/services/__tests__/ad-campaign-credit-reconciliation.test.ts b/packages/cloud/shared/src/lib/services/__tests__/ad-campaign-credit-reconciliation.test.ts index 510bb9dcf3d01..6c24d97736b7e 100644 --- a/packages/cloud/shared/src/lib/services/__tests__/ad-campaign-credit-reconciliation.test.ts +++ b/packages/cloud/shared/src/lib/services/__tests__/ad-campaign-credit-reconciliation.test.ts @@ -195,6 +195,7 @@ describe("updateCampaign — reconciles the credit hold on a budget change", () id: "acct-1", organization_id: ORG_ID, platform: "meta", + status: "active", } as never), ); // getCredentials is private + hits the secrets vault; stub it out. @@ -322,6 +323,7 @@ describe("updateCampaign — budget DECREASE refunds only unused + is atomic (#1 id: "acct-1", organization_id: ORG_ID, platform: "meta", + status: "active", } as never), ); track(