Skip to content

CONV-268: Test duplicate credit pack purchase is ignored#237

Merged
menvil merged 1 commit into
developfrom
feature/CONV-268-test-duplicate-credit-pack-purchase-is-ignored
Jun 2, 2026
Merged

CONV-268: Test duplicate credit pack purchase is ignored#237
menvil merged 1 commit into
developfrom
feature/CONV-268-test-duplicate-credit-pack-purchase-is-ignored

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds two failing idempotency tests to CreditPackWebhookHandlerTest:
    1. Same event ID called twice → credits granted once only
    2. Same checkout session ID, different event IDs → credits granted once only
  • Tests fail with double balance (1050 instead of 550) — intentional, implementation in CONV-269

Test plan

  • Tests confirmed failing before implementation
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Adds two tests for CreditPackWebhookHandler to ensure duplicate Stripe credit pack purchases don’t grant credits twice (CONV-268).

Covers both same event ID replays and the same checkout session with different event IDs.

Written for commit b24a652. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 474cbcb7-e27b-46ff-99ca-51f3f29343dc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-268-test-duplicate-credit-pack-purchase-is-ignored

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil force-pushed the feature/CONV-268-test-duplicate-credit-pack-purchase-is-ignored branch from 96e435d to b24a652 Compare June 2, 2026 18:32
@menvil menvil merged commit f0b9afd into develop Jun 2, 2026
@menvil menvil deleted the feature/CONV-268-test-duplicate-credit-pack-purchase-is-ignored branch June 2, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant