mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
fix 2 assumptions
This commit is contained in:
parent
7b4db18c52
commit
9fc6a63bea
@ -41,6 +41,21 @@ describe('validate alias', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('alias length', () => {
|
||||
it('2 characters is not ok', () => {
|
||||
expect(() => aliasSchema.parse('Bi')).toThrowError()
|
||||
})
|
||||
it('3 characters is ok', () => {
|
||||
expect(() => aliasSchema.parse('Bib')).not.toThrowError()
|
||||
})
|
||||
it('20 characters is ok', () => {
|
||||
expect(() => aliasSchema.parse('BibiBloxbergMondLich')).not.toThrowError()
|
||||
})
|
||||
it('21 characters is not ok', () => {
|
||||
expect(() => aliasSchema.parse('BibiBloxbergZauberwald')).toThrowError()
|
||||
})
|
||||
})
|
||||
|
||||
describe('alias is a reserved word with uppercase characters', () => {
|
||||
it('throws and logs an error', () => {
|
||||
expect(() => aliasSchema.parse('Admin')).toThrowError(expect.objectContaining(
|
||||
|
||||
@ -14,7 +14,6 @@ const RESERVED_ALIAS = [
|
||||
'support',
|
||||
'temp',
|
||||
'tmp',
|
||||
'tmp',
|
||||
'user',
|
||||
'usr',
|
||||
'var',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user