Skip to content

Commit

Permalink
test/moderation: Add test for #884
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Apr 3, 2018
1 parent 04f4d54 commit d8a4170
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/tests/moderation/caps.js
Expand Up @@ -54,4 +54,16 @@ describe('systems/moderation - Caps()', () => {
})
}
})
describe('#884 - message length - 15, max caps 80%, message: FrankerZ FrankerZ', async () => {
before(async () => {
await db.cleanup()
await global.db.engine.insert('settings', { key: 'moderationCaps', value: 'true' })
await global.db.engine.insert('settings', { key: 'moderationCapsMaxPercent', value: 80 })
await global.db.engine.insert('settings', { key: 'moderationCapsTriggerLength', value: 15 })
})

it(`message 'FrankerZ FrankerZ' should not timeout`, async () => {
assert.isTrue(await global.systems.moderation.caps(global.systems.moderation, { username: 'testuser' }, 'FrankerZ FrankerZ'))
})
})
})

0 comments on commit d8a4170

Please sign in to comment.