Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
vbhayden committed Apr 5, 2018
1 parent 85bc752 commit 574e2df
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
31 changes: 28 additions & 3 deletions test/v1_0_2/configs/statements.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
var VALID_EXTENSION = {extensions: {'http://example.com/null': null}};
var VALID_VERSION_1_0 = '1.0';
var VALID_VERSION_1_0_9 = '1.0.9';
var INVALID_DATE_OFFSET = "2008-09-15T15:53:00-00";

// configures tests
module.exports.config = function () {
Expand Down Expand Up @@ -133,7 +134,15 @@
{timestamp: INVALID_DATE}
],
expect: [400]
}
},
{
name: 'statement "template" invalid date',
templates: [
{statement: '{{statements.default}}'},
{timestamp: INVALID_DATE_OFFSET}
],
expect: [400]
},
]
},
{
Expand All @@ -154,7 +163,15 @@
{timestamp: INVALID_DATE}
],
expect: [400]
}
},
{
name: 'statement "template" invalid date',
templates: [
{statement: '{{statements.default}}'},
{timestamp: INVALID_DATE_OFFSET}
],
expect: [400]
},
]
},
{
Expand Down Expand Up @@ -183,7 +200,15 @@
{stored: '2013-05-18T05:32:34.804Z'}
],
expect: [400]
}
},
{
name: 'statement "template" invalid date',
templates: [
{statement: '{{statements.default}}'},
{timestamp: INVALID_DATE_OFFSET}
],
expect: [400]
},
]
},
{
Expand Down
19 changes: 18 additions & 1 deletion test/v1_0_3/configs/timestamps.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// defines overwriting data
var INVALID_DATE = '01/011/2015';
var INVALID_STRING = 'should fail';
var INVALID_DATE_OFFSET = "2008-09-15T15:53:00-00";

// configures tests
module.exports.config = function () {
Expand All @@ -37,6 +38,14 @@
],
expect: [400]
},
{
name: 'statement "template" invalid date',
templates: [
{statement: '{{statements.default}}'},
{timestamp: INVALID_DATE_OFFSET}
],
expect: [400]
},
{
name: 'substatement "template" invalid string in timestamp',
templates: [
Expand All @@ -52,7 +61,15 @@
{timestamp: INVALID_DATE}
],
expect: [400]
}
},
{
name: 'substatement "template" invalid date in timestamp',
templates: [
{statement: '{{statements.default}}'},
{timestamp: INVALID_DATE_OFFSET}
],
expect: [400]
},
]
}
];
Expand Down

0 comments on commit 574e2df

Please sign in to comment.