Skip to content

Commit

Permalink
fixed all issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rajkumarajce committed Oct 6, 2016
1 parent d305e64 commit 5405ec0
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions test/pmp-simple-date-input_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,23 @@
setup(function() {
element = fixture('basic');
});
test('instantiating the dob element works', function() {
test('instantiating the date element works', function() {
assert.equal(element.is, 'pmp-simple-date-input');
});
test('setting some date value for dob and checking the value sets properly', function() {
test('setting some date value for date and checking the value sets properly', function() {
element.value = '10/11/1984';
assert.equal(element.value, '10/11/1984');
});
test('setting invalid date value for dob and check the validity', function() {
test('setting invalid date value for date and check the validity', function() {
element.value = '45/45/4545';
element.validate();
assert.isTrue(element.invalid, 'Date of Birth is invalid');
});
test('setting valid date value for dob and check the validity', function() {
test('setting valid date value for date and check the validity', function() {
element.value = '10/11/1983';
element.validate();
assert.isFalse(element.invalid, 'Date of Birth is invalid');
});
test('setting valid date value for dob but date falls within 18years and check the validity', function() {
element.value = '10/11/2003';
element.validate();
assert.isTrue(element.invalid, 'Date of Birth is invalid');
});
});
</script>
</body>
Expand Down

0 comments on commit 5405ec0

Please sign in to comment.