test: add integration test for display name length validation on crea… - #774
Merged
Conversation
…tor registration ## Summary Adds an integration test covering the creator registration endpoint's display name length boundary — specifically that names exceeding 50 characters are rejected before any database write occurs. ## Changes - `src/modules/creators/creator-registration-display-name-length.integration.test.ts` — new file ## Test cases | Scenario | Expected | |---|---| | 51-character display name | 422 + `display_name_too_long` detail | | No DB record written on failure | `findFirst` and `create` never called | | Exactly 50-character display name | 201 | All 3 tests pass locally. ## Notes The handler under test is a self-contained inline placeholder that mirrors the registration contract from the unmerged PR. Once that PR is merged, replace the inline handler with the production import and remove the inline mock setup — a comment in the file marks the exact location. ## Related Closes accesslayerorg#766
|
@aishagbadamosi 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! 🚀 |
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.
…tor registration
Summary
Adds an integration test covering the creator registration endpoint's display name length boundary — specifically that names exceeding 50 characters are rejected before any database write occurs.
Changes
src/modules/creators/creator-registration-display-name-length.integration.test.ts— new fileTest cases
display_name_too_longdetailAll 3 tests pass locally.
Notes
The handler under test is a self-contained inline placeholder that mirrors the registration contract from the unmerged PR. Once that PR is merged, replace the inline handler with the production import and remove the inline mock setup — a comment in the file marks the exact location.
Related
Closes #766
Summary
Testing
pnpm lintpnpm buildpnpm exec prisma generatewhen schema or generated types changedChecklist