diff --git a/test/v1_0_2/configs/statements.js b/test/v1_0_2/configs/statements.js index 66e332a..3086493 100644 --- a/test/v1_0_2/configs/statements.js +++ b/test/v1_0_2/configs/statements.js @@ -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 () { @@ -133,7 +134,15 @@ {timestamp: INVALID_DATE} ], expect: [400] - } + }, + { + name: 'statement "template" invalid date', + templates: [ + {statement: '{{statements.default}}'}, + {timestamp: INVALID_DATE_OFFSET} + ], + expect: [400] + }, ] }, { @@ -154,7 +163,15 @@ {timestamp: INVALID_DATE} ], expect: [400] - } + }, + { + name: 'statement "template" invalid date', + templates: [ + {statement: '{{statements.default}}'}, + {timestamp: INVALID_DATE_OFFSET} + ], + expect: [400] + }, ] }, { @@ -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] + }, ] }, { diff --git a/test/v1_0_3/configs/timestamps.js b/test/v1_0_3/configs/timestamps.js index 65b104b..4a817b9 100644 --- a/test/v1_0_3/configs/timestamps.js +++ b/test/v1_0_3/configs/timestamps.js @@ -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 () { @@ -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: [ @@ -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] + }, ] } ];