mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix backend tests to new default group description length without HTML
This commit is contained in:
parent
9c1d6d7f1f
commit
6a87ed5cb4
@ -328,15 +328,15 @@ describe('in mode', () => {
|
|||||||
|
|
||||||
describe('description', () => {
|
describe('description', () => {
|
||||||
describe('length without HTML', () => {
|
describe('length without HTML', () => {
|
||||||
describe('less then 100 chars', () => {
|
describe('less then 3 chars', () => {
|
||||||
it('throws error: "Description too short!"', async () => {
|
it('throws error: "Description too short!"', async () => {
|
||||||
const { errors } = await mutate({
|
const { errors } = await mutate({
|
||||||
mutation: createGroupMutation(),
|
mutation: createGroupMutation(),
|
||||||
variables: {
|
variables: {
|
||||||
...variables,
|
...variables,
|
||||||
description:
|
description:
|
||||||
'0123456789' +
|
'0' +
|
||||||
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0123456789</a>',
|
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0</a>',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
expect(errors![0]).toHaveProperty('message', 'Description too short!')
|
expect(errors![0]).toHaveProperty('message', 'Description too short!')
|
||||||
@ -2850,15 +2850,15 @@ describe('in mode', () => {
|
|||||||
|
|
||||||
describe('description', () => {
|
describe('description', () => {
|
||||||
describe('length without HTML', () => {
|
describe('length without HTML', () => {
|
||||||
describe('less then 100 chars', () => {
|
describe('less then 3 chars', () => {
|
||||||
it('throws error: "Description too short!"', async () => {
|
it('throws error: "Description too short!"', async () => {
|
||||||
const { errors } = await mutate({
|
const { errors } = await mutate({
|
||||||
mutation: updateGroupMutation(),
|
mutation: updateGroupMutation(),
|
||||||
variables: {
|
variables: {
|
||||||
id: 'my-group',
|
id: 'my-group',
|
||||||
description:
|
description:
|
||||||
'0123456789' +
|
'0' +
|
||||||
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0123456789</a>',
|
'<a href="https://domain.org/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789">0</a>',
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
expect(errors![0]).toHaveProperty('message', 'Description too short!')
|
expect(errors![0]).toHaveProperty('message', 'Description too short!')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user