mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix test
This commit is contained in:
parent
3ce1f58a89
commit
da6bdfaa61
@ -9,15 +9,17 @@ describe('test publish name logic', () => {
|
||||
it('alias or initials with alias set', () => {
|
||||
const user = new User()
|
||||
user.alias = 'alias'
|
||||
user.humhubPublishName = PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS
|
||||
const logic = new PublishNameLogic(user)
|
||||
expect(logic.getUsername(PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS)).toBe(user.alias)
|
||||
expect(logic.getUsername()).toBe(user.alias)
|
||||
})
|
||||
it('alias or initials with empty alias', () => {
|
||||
const user = new User()
|
||||
user.firstName = 'John'
|
||||
user.lastName = 'Smith'
|
||||
user.humhubPublishName = PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS
|
||||
const logic = new PublishNameLogic(user)
|
||||
expect(logic.getUsername(PublishNameType.PUBLISH_NAME_ALIAS_OR_INITALS)).toBe('JoSm')
|
||||
expect(logic.getUsername()).toBe('JoSm')
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user