diff --git a/packages/hoppscotch-backend/src/user-collection/user-collection.service.spec.ts b/packages/hoppscotch-backend/src/user-collection/user-collection.service.spec.ts index 8db389b8f8..38cc066ca1 100644 --- a/packages/hoppscotch-backend/src/user-collection/user-collection.service.spec.ts +++ b/packages/hoppscotch-backend/src/user-collection/user-collection.service.spec.ts @@ -495,10 +495,10 @@ describe('getUserRootCollections', () => { }); describe('createUserCollection', () => { - test('should throw USER_COLL_SHORT_TITLE when title is less than 3 characters', async () => { + test('should throw USER_COLL_SHORT_TITLE when title is an empty string', async () => { const result = await userCollectionService.createUserCollection( user, - 'ab', + '', rootRESTUserCollection.id, ReqType.REST, ); @@ -694,7 +694,7 @@ describe('createUserCollection', () => { }); describe('renameUserCollection', () => { - test('should throw USER_COLL_SHORT_TITLE when title is less than 3 characters', async () => { + test('should throw USER_COLL_SHORT_TITLE when title is empty', async () => { const result = await userCollectionService.renameUserCollection( '', rootRESTUserCollection.id, diff --git a/packages/hoppscotch-backend/src/user-collection/user-collection.service.ts b/packages/hoppscotch-backend/src/user-collection/user-collection.service.ts index 3ee6fb0260..169f47aa65 100644 --- a/packages/hoppscotch-backend/src/user-collection/user-collection.service.ts +++ b/packages/hoppscotch-backend/src/user-collection/user-collection.service.ts @@ -34,7 +34,7 @@ export class UserCollectionService { private readonly pubsub: PubSubService, ) {} - TITLE_LENGTH = 3; + TITLE_LENGTH = 1; /** * Typecast a database UserCollection to a UserCollection model