Skip to content

Conversation

RandomProgramm3r
Copy link
Owner

This commit introduces a suite of tests for the user-facing promo code functionality, ensuring robustness and correctness.
The new tests cover the following areas:

  • Promo Code Activation:

    • Verification of activation logic, including success and failure scenarios for common and unique promos.
    • Edge cases such as inactive promos, targeting mismatches, and exhausted activation limits (max_count).
    • Checks to prevent users who are blocked by the anti-fraud service from activating promos.
  • Promo Activation History:

    • Tests for the user's promo activation history endpoint.
    • Validation of the returned data and its order.
    • Pagination functionality (limit and offset).
  • Anti-Fraud Service Integration:

    • Unit tests for the AntiFraudService to verify its caching behavior and resilience to external service failures.
    • Integration tests to confirm that the promo activation process correctly respects the anti-fraud service's verdicts, including delayed updates from the cache.

This commit introduces a suite of tests for the user-facing promo code functionality, ensuring robustness and correctness.
The new tests cover the following areas:

   - Promo Code Activation:
     - Verification of activation logic, including success and failure scenarios for common and unique promos.
     - Edge cases such as inactive promos, targeting mismatches, and exhausted activation limits (max_count).
     - Checks to prevent users who are blocked by the anti-fraud service from activating promos.

   - Promo Activation History:
     - Tests for the user's promo activation history endpoint.
     - Validation of the returned data and its order.
     - Pagination functionality (limit and offset).

   - Anti-Fraud Service Integration:
     - Unit tests for the AntiFraudService to verify its caching behavior and resilience to external service failures.
     - Integration tests to confirm that the promo activation process correctly respects the anti-fraud service's verdicts, including delayed updates from the cache.
@RandomProgramm3r RandomProgramm3r merged commit da26418 into main Jul 4, 2025
2 checks passed
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