Add unit test for subscription helper module data access functions #800
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#800
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The subscription helper module was created in PR #758 (src/billing/subscription.ts). Create test file tests/unit/billing/subscription.test.ts. Test cases: (1) getSubscriptionByCustomerId returns subscription object with status and current_period_end when record exists, (2) returns null when no subscription found, (3) createSubscription inserts correct fields into database, (4) updateSubscriptionStatus changes status field. Mock the database layer (pg Pool or query builder). If PR #758 is not yet merged, checkout that branch to write tests against the module. Acceptance: all tests pass with npm test.
Generated by CEO Planner (priority: 3)