- Notifications
You must be signed in to change notification settings - Fork11.2k
Commitf0e1012
authored
test: Improve create teams handler tests (#25213)
I am refactoring create teams handler to a service in another PR - thought we should improve the test in the mean time.<!-- This is an auto-generated description by cubic. -->---## Summary by cubicExpand and restructure tests for createTeamsHandler to cover auth, org/slug validation, team creation and migration, redirects, credits, invites, and subscriptions. This improves reliability ahead of the service refactor.- **Refactors** - Rewrote tests into scenario-based suites for Authorization, Organization Validation, Slug Validation, Team Creation/Migration, Redirects, and Edge Cases. - Added helpers (createTestProfile, flexible createScenario/createTestMembership) and organization/profile support to model slug collisions. - Assert TRPCError codes/messages and redirect records; cover platform orgs, unpublished/non-existent teams, and empty names. - Mocked Stripe subscription cancel and inviteMembersWithNoInviterPermissionCheck; verified credit transfer and owner memberships.<sup>Written for commit8c216c6. Summary will update automatically on new commits.</sup><!-- End of auto-generated description by cubic. -->1 parent7c5731e commitf0e1012
File tree
1 file changed
+1062
-280
lines changed- packages/trpc/server/routers/viewer/organizations/__tests__
1 file changed
+1062
-280
lines changed0 commit comments
Comments
(0)