[Agent] Issue #653: write an integration test that 1 creates #657

Open
pook wants to merge 61 commits from agent-task/653 into main
Owner

Closes #653

Changes

feat: issue #653 write-an-integration-test-that-1-creates (agent task liancebot653)

Acceptance Criteria

Write an integration test that: (1) Creates an authenticated user (valid JWT session), (2) Mocks the Stripe checkout.sessions.create call to return a fake session with a checkout URL, (3) Sends POST /api/billing/checkout with a valid price_id in the body, (4) Asserts 200 response with JSON containing a url field matching the Stripe checkout pattern (https://checkout.stripe.com/...), (5) Verifies the Stripe mock was called with the correct customer email and price. Follow existing test patterns in the repo. This is the first step in the billing funnel — if checkout fails, no revenue. Complements existing issue #649 (the endpoint implementation). Acceptance: Test passes, verifies authenticated users get a valid Stripe checkout URL.


Generated by CEO Planner (priority: 2)

Tokens: 14 in / 8411 out

Closes #653 ## Changes feat: issue #653 write-an-integration-test-that-1-creates (agent task liancebot653) ## Acceptance Criteria Write an integration test that: (1) Creates an authenticated user (valid JWT session), (2) Mocks the Stripe checkout.sessions.create call to return a fake session with a checkout URL, (3) Sends POST /api/billing/checkout with a valid price_id in the body, (4) Asserts 200 response with JSON containing a `url` field matching the Stripe checkout pattern (https://checkout.stripe.com/...), (5) Verifies the Stripe mock was called with the correct customer email and price. Follow existing test patterns in the repo. This is the first step in the billing funnel — if checkout fails, no revenue. Complements existing issue #649 (the endpoint implementation). Acceptance: Test passes, verifies authenticated users get a valid Stripe checkout URL. --- *Generated by CEO Planner (priority: 2)* Tokens: 14 in / 8411 out
feat: issue #653 write-an-integration-test-that-1-creates (agent task liancebot653)
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled
6d04f4c77a
Some checks failed
CI Quality Gate / Lint / Typecheck / Test / Build (pull_request) Has been cancelled
This pull request has changes conflicting with the target branch.
  • .forgejo/workflows/ci.yml
  • bun.lock
  • package.json
  • packages/api/src/db/schema.ts
  • packages/api/src/index.ts
  • packages/api/src/middleware/csrf.ts
  • packages/api/src/middleware/rate-limit.ts
  • packages/api/src/middleware/security-headers.ts
  • packages/api/src/routes/admin.ts
  • packages/api/src/routes/billing.ts
  • packages/api/src/routes/generate-tos.ts
  • packages/api/src/routes/generate.ts
  • packages/api/src/routes/health.ts
  • packages/api/src/routes/questionnaire.ts
  • packages/api/src/services/document-generator.ts
  • packages/api/src/services/llm.ts
  • packages/api/src/templates/index.ts
  • packages/api/tsconfig.json
  • packages/shared/src/types.ts
  • packages/web/src/app/questionnaire/page.tsx
  • packages/web/src/components/documents/DocumentList.tsx
  • packages/web/src/components/questionnaire/ReviewStep.tsx
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin agent-task/653:agent-task/653
git switch agent-task/653
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot!657
No description provided.