Skip to content

Commit 958b5d1

Browse files
committed
test(validation): check query validation boundaries for org param
1 parent ea059a6 commit 958b5d1

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
@@ -475,6 +475,18 @@ describe('streakParamsSchema — size fallback behavior', () => {
475475
}
476476
});
477477

478+
it('should fail when org contains invalid characters or spaces', () => {
479+
const result = streakParamsSchema.safeParse({
480+
user: 'octocat',
481+
org: 'invalid_org_name_with_spaces',
482+
});
483+
484+
expect(result.success).toBe(false);
485+
if (!result.success) {
486+
expect(result.error.issues[0]?.message).toBe('Invalid organization name format');
487+
}
488+
});
489+
478490
it('should accept repo parameter when provided', () => {
479491
const result = streakParamsSchema.safeParse({
480492
user: 'octocat',

0 commit comments

Comments
 (0)