Skip to content

Conversation

lucasdotvin
Copy link
Owner

@lucasdotvin lucasdotvin commented Mar 20, 2025

This pull request includes changes to the Subscription model and its corresponding tests to handle the grace_days feature more effectively. The most important changes include updating the renew method in Subscription to set the grace_days_ended_at attribute and adding tests to ensure this functionality works correctly.

Enhancements to Subscription model:

Tests for grace_days feature:

  • tests/Models/SubscriptionTest.php: Added testModelUpdatesGraceDaysEndedAtWhenRenewing to verify that grace_days_ended_at is correctly updated when renewing a subscription.
  • tests/Models/SubscriptionTest.php: Added testModelLeavesGraceDaysEmptyWhenRenewingIfPlanDoesNotHaveIt to ensure grace_days_ended_at remains null if the plan does not have grace days.

@lucasdotvin lucasdotvin added bug Something isn't working enhancement New feature or request labels Mar 20, 2025
@lucasdotvin lucasdotvin self-assigned this Mar 20, 2025
Copy link

codecov bot commented Mar 20, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.89%. Comparing base (8748602) to head (262ca23).
Report is 2 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #119      +/-   ##
============================================
+ Coverage     97.84%   97.89%   +0.04%     
- Complexity      152      154       +2     
============================================
  Files            26       26              
  Lines           511      522      +11     
============================================
+ Hits            500      511      +11     
  Misses           11       11              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lucasdotvin lucasdotvin changed the title [Release] 4.3.0 - Renew-related fixes [Feature] 4.3.0 - Update grace days on subscription renew Mar 20, 2025
@lucasdotvin lucasdotvin removed the enhancement New feature or request label Mar 21, 2025
@lucasdotvin lucasdotvin changed the title [Feature] 4.3.0 - Update grace days on subscription renew [Bugfix] 4.2.3 - Update grace days on subscription renew Mar 21, 2025
@lucasdotvin lucasdotvin merged commit d2b1c86 into main Mar 21, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants