Skip to content

Commit 95ecdab

Browse files
author
brian.mcbrayer
committedDec 24, 2014
Added validation tests
1 parent a4daebc commit 95ecdab

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed
 

‎Gruntfile.js

+11
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,17 @@ module.exports = function(grunt) {
127127
)
128128
}
129129
},
130+
validation: {
131+
options: {
132+
files: [].concat(
133+
TESTS.beforeTestFiles,
134+
'src/kendo.core.js',
135+
'src/kendo.validator.js',
136+
TESTS.afterTestFiles,
137+
'tests/validation/validator.js'
138+
)
139+
}
140+
},
130141
legacyUnit: {
131142
options: {
132143
browsers: browserOption ? [ browserOption ] : [],

‎tests/validation/validator.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -787,14 +787,14 @@
787787
});
788788

789789
test("valid class is added to the valid inputs", function() {
790-
var input = $('<input type="text" required />'),
791-
validator = setup(input);
790+
var input = $('<input type="text" required />'),
791+
validator = setup(input);
792792

793-
input.val('foo');
793+
input.val(1);
794794

795-
validator.validate();
795+
validator.validate();
796796

797-
ok(input.hasClass("k-valid"));
797+
ok(input.hasClass("k-valid"));
798798
});
799799

800800
test("aria-invalid is added to the invalid input", function() {

0 commit comments

Comments
 (0)