Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-19895][BEEEP] Add unit test for SubscriptionUpdatedHandler and SubscriptionDeletedHandler #5612

Conversation

cyprain-okeke
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-19895

📔 Objective

Add unit testing for the the following class on stripeController (Webhook)

SubscriptionUpdatedHandler

SubscriptionDeletedHandler

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@cyprain-okeke cyprain-okeke requested a review from a team April 4, 2025 19:29
Copy link

sonarqubecloud bot commented Apr 4, 2025

Copy link
Contributor

github-actions bot commented Apr 4, 2025

Logo
Checkmarx One – Scan Summary & Details7f8393a3-ad6c-4cf4-9737-388640b2709c

New Issues (2)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationDomainController.cs: 94
detailsMethod Verify at line 94 of /src/Api/AdminConsole/Controllers/OrganizationDomainController.cs gets a parameter from a user request from orgId. This...
Attack Vector
MEDIUM CSRF /src/Api/AdminConsole/Controllers/OrganizationDomainController.cs: 94
detailsMethod Verify at line 94 of /src/Api/AdminConsole/Controllers/OrganizationDomainController.cs gets a parameter from a user request from id. This pa...
Attack Vector
Fixed Issues (4)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: 164
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: 96
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: 86
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/GroupsController.cs: 133

Copy link

codecov bot commented Apr 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.35%. Comparing base (39ac933) to head (c39e0d3).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5612      +/-   ##
==========================================
+ Coverage   45.12%   45.35%   +0.22%     
==========================================
  Files        1565     1565              
  Lines       71719    71719              
  Branches     6424     6424              
==========================================
+ Hits        32363    32525     +162     
+ Misses      37979    37804     -175     
- Partials     1377     1390      +13     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cyprain-okeke cyprain-okeke merged commit e53e701 into main Apr 7, 2025
54 checks passed
@cyprain-okeke cyprain-okeke deleted the pm-19895-add-unit-test-for-subscriptionUpdatedHandler-and-subscriptionDeletedHandler branch April 7, 2025 10: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.

2 participants