refactor: change user collections min title length to 1
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user