Skip to content

Commit 83861a8

Browse files
Merge branch 'main' into feat/shareable-customize-url
2 parents 2c83906 + 401717f commit 83861a8

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

lib/validations.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,18 @@ describe('streakParamsSchema — org parameter validation', () => {
771771
expect(fieldError).toBe('Invalid organization name format');
772772
}
773773
});
774+
775+
it('should reject org parameter with invalid alphanumeric format', () => {
776+
const result = streakParamsSchema.safeParse({
777+
user: 'octocat',
778+
org: 'invalid_org_name_with_spaces',
779+
});
780+
781+
expect(result.success).toBe(false);
782+
if (!result.success) {
783+
expect(result.error.flatten().fieldErrors.org?.[0]).toBe('Invalid organization name format');
784+
}
785+
});
774786
});
775787

776788
describe('ogParamsSchema', () => {

0 commit comments

Comments
 (0)