Skip to content

Commit

Permalink
Expand xml schema datetime tests w/ max and min day tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
aljones15 committed Dec 1, 2023
1 parent b586213 commit 76ae708
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/20-dateRegex.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,18 @@ describe('verifies XML Schema DateTime', function() {
it('should not accept a basic ISO DateTime', function() {
assertDateTime('20190326T1400Z', false);
});
it('should not accept a 0 as a month', function() {
it('should not accept 00 as a month', function() {
assertDateTime('2019-00-26T14:00:00Z', false);
});
it('should not accept a 0 as a day', function() {
it('should not accept 13 as a month', function() {
assertDateTime('2019-00-26T14:00:00Z', false);
});
it('should not accept 00 as a day', function() {
assertDateTime('2019-01-00T14:00:00Z', false);
});
it('should not accept 32 as a day', function() {
assertDateTime('2019-01-32T14:00:00Z', false);
});
it('should not accept a time past midnight', function() {
assertDateTime('2019-03-25T24:01:00Z', false);
});
Expand Down

0 comments on commit 76ae708

Please sign in to comment.