Update gl_field_error tests for better input filtering.

This commit is contained in:
Bryce Johnson 2016-10-20 12:47:32 +02:00
parent 5f0b7fe429
commit 06564f9e04
1 changed files with 2 additions and 2 deletions

View File

@ -11,12 +11,12 @@
this.fieldErrors = new global.GlFieldErrors($form); this.fieldErrors = new global.GlFieldErrors($form);
}); });
it('should properly initialize the form', function() { it('should select the correct input elements', function() {
expect(this.$form).toBeDefined(); expect(this.$form).toBeDefined();
expect(this.$form.length).toBe(1); expect(this.$form.length).toBe(1);
expect(this.fieldErrors).toBeDefined(); expect(this.fieldErrors).toBeDefined();
const inputs = this.fieldErrors.state.inputs; const inputs = this.fieldErrors.state.inputs;
expect(inputs.length).toBe(5); expect(inputs.length).toBe(4);
}); });
it('should ignore elements with custom error handling', function() { it('should ignore elements with custom error handling', function() {