b05f6b9da0
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>
17 lines
533 B
TypeScript
17 lines
533 B
TypeScript
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);
|
|
});
|
|
});
|