test: cover empty webhook list for creators with no registered webhooks (#551)#561
Open
CodingAngel1 wants to merge 1 commit into
Open
test: cover empty webhook list for creators with no registered webhooks (#551)#561CodingAngel1 wants to merge 1 commit into
CodingAngel1 wants to merge 1 commit into
Conversation
|
@CodingAngel1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Fix your pr description |
Author
|
@Chucks1093 The description has been fixed. Please review and merge. Thank you for your patience. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #551
This PR adds an integration test to verify that
GET /api/v1/creators/:id/webhooksreturns200 OKwith an empty array ([]) when a creator exists but has not registered any webhooks.The current implementation is already correct. The
listWebhooksHandlerinsrc/modules/webhooks/webhook.controllers.tsdelegates towebhookService.listWebhooks, which returns an empty array when no matching webhook records are found. This change adds automated test coverage to ensure that behavior remains consistent over time.Scope
The new integration test:
Creates a valid creator (User → StellarWallet → CreatorProfile) without registering any webhooks.
Sends an authenticated request to
GET /api/v1/creators/:id/webhooksusing wallet-signed headers generated from the creator's Stellar keypair.Verifies that the endpoint returns:
HTTP 200 OK
success: truedata: []Files Changed
File | Description -- | -- src/modules/webhooks/webhook.integration.test.ts | Adds a new integration test covering the "creator with no webhooks" scenario.Verification
The following checks were executed locally:
All commands completed successfully. The new
#551integration test passed, andtsc --noEmitexited without errors.Risk Assessment
Low risk.
This is a test-only change. No production code or application behavior has been modified.
Out of Scope
This PR does not address existing integration tests that use non-numeric creator IDs (for example,
"webhook-test-creator-id"), which may fail the currentparseCreatorIdvalidation. Those pre-existing issues are unrelated to this change and will be handled separately.