From 654cc261b446af1e6d4c6f88c721fa42065ff179 Mon Sep 17 00:00:00 2001 From: Iain Beeston Date: Thu, 29 Sep 2016 10:52:19 +0100 Subject: [PATCH] Added tests for items when data contains more or less types than the schema What happens if you specify items as an array of types, but you don't include a value for every type? Right now we have no tests for that. We also don't have a test for when there are more values than defined item types. --- tests/draft4/items.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/draft4/items.json b/tests/draft4/items.json index f5e18a13..e41d92ec 100644 --- a/tests/draft4/items.json +++ b/tests/draft4/items.json @@ -40,6 +40,21 @@ "description": "wrong types", "data": [ "foo", 1 ], "valid": false + }, + { + "description": "incomplete array of items", + "data": [ 1 ], + "valid": true + }, + { + "description": "array with additional items", + "data": [ 1, "foo", true ], + "valid": true + }, + { + "description": "empty array", + "data": [ ], + "valid": true } ] }