Add Feedback domain module: public submission flow, admin CRUD, reporting (#7)
Jenkins Production Deployment
Jenkins Production Deployment
Co-authored-by: Patrick Müller <mail@pmueller.me> Reviewed-on: #7 Co-authored-by: Patrick Mueller <patrick@mueller-patrick.tech> Co-committed-by: Patrick Mueller <patrick@mueller-patrick.tech>
This commit was merged in pull request #7.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import {isHoneypotTriggered} from '../../src/models/feedback/public/public.router';
|
||||
|
||||
describe('isHoneypotTriggered', () => {
|
||||
it('is false when the field is absent', () => {
|
||||
expect(isHoneypotTriggered({})).toBe(false);
|
||||
});
|
||||
|
||||
it('is false when the field is empty', () => {
|
||||
expect(isHoneypotTriggered({website: ''})).toBe(false);
|
||||
expect(isHoneypotTriggered({website: ' '})).toBe(false);
|
||||
});
|
||||
|
||||
it('is true when a bot filled it in', () => {
|
||||
expect(isHoneypotTriggered({website: 'https://spam.example'})).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user