refactor: change user collections min title length to 1

This commit is contained in:
Andrew Bastin
2023-04-11 15:40:26 +05:30
parent c353d60ddc
commit b68115d3b2
2 changed files with 4 additions and 4 deletions

View File

@@ -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,

View File

@@ -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