Skip to content

Commit f0e1012

Browse files
authored
test: Improve create teams handler tests (calcom#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 cubic Expand 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 commit 8c216c6. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. -->
1 parent 7c5731e commit f0e1012

1 file changed

Lines changed: 1062 additions & 280 deletions

File tree

0 commit comments

Comments
 (0)