Fix backend tests to new default group description length without HTML

This commit is contained in:
Wolfgang Huß 2024-01-04 14:48:13 +01:00
parent 9c1d6d7f1f
commit 6a87ed5cb4

View File

@ -328,15 +328,15 @@ describe('in mode', () => {
describe('description', () => {
describe('length without HTML', () => {
describe('less then 100 chars', () => {
describe('less then 3 chars', () => {
it('throws error: "Description too short!"', async () => {
const { errors } = await mutate({
mutation: createGroupMutation(),
variables: {
...variables,
description:
'0123456789' +
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0123456789</a>',
'0' +
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0</a>',
},
})
expect(errors![0]).toHaveProperty('message', 'Description too short!')
@ -2850,15 +2850,15 @@ describe('in mode', () => {
describe('description', () => {
describe('length without HTML', () => {
describe('less then 100 chars', () => {
describe('less then 3 chars', () => {
it('throws error: "Description too short!"', async () => {
const { errors } = await mutate({
mutation: updateGroupMutation(),
variables: {
id: 'my-group',
description:
'0123456789' +
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0123456789</a>',
'0' +
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0</a>',
},
})
expect(errors![0]).toHaveProperty('message', 'Description too short!')