refactor: change user collections min title length to 1
This commit is contained in:
@@ -495,10 +495,10 @@ describe('getUserRootCollections', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('createUserCollection', () => {
|
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(
|
const result = await userCollectionService.createUserCollection(
|
||||||
user,
|
user,
|
||||||
'ab',
|
'',
|
||||||
rootRESTUserCollection.id,
|
rootRESTUserCollection.id,
|
||||||
ReqType.REST,
|
ReqType.REST,
|
||||||
);
|
);
|
||||||
@@ -694,7 +694,7 @@ describe('createUserCollection', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('renameUserCollection', () => {
|
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(
|
const result = await userCollectionService.renameUserCollection(
|
||||||
'',
|
'',
|
||||||
rootRESTUserCollection.id,
|
rootRESTUserCollection.id,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export class UserCollectionService {
|
|||||||
private readonly pubsub: PubSubService,
|
private readonly pubsub: PubSubService,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
TITLE_LENGTH = 3;
|
TITLE_LENGTH = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Typecast a database UserCollection to a UserCollection model
|
* Typecast a database UserCollection to a UserCollection model
|
||||||
|
|||||||
Reference in New Issue
Block a user