Skip to content

Commit

Permalink
refactor: change user collections min title length to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBastin committed Apr 11, 2023
1 parent c353d60 commit b68115d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b68115d

Please sign in to comment.