diff options
| author | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-03-22 17:22:29 +0000 |
|---|---|---|
| committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2014-03-22 17:22:29 +0000 |
| commit | bfc6d68337150c52c8ce2dc6a7d19a9d1bd92795 (patch) | |
| tree | 7f1e53bb95f9bc2624280f027e3f0aeb280f9667 /tests/schema/maxItems.json | |
| parent | 2ae6de7c252d1781a158740c2481220dfdd6cc77 (diff) | |
Notes
Diffstat (limited to 'tests/schema/maxItems.json')
| -rw-r--r-- | tests/schema/maxItems.json | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/schema/maxItems.json b/tests/schema/maxItems.json new file mode 100644 index 0000000000000..3b53a6b371a7b --- /dev/null +++ b/tests/schema/maxItems.json @@ -0,0 +1,28 @@ +[ + { + "description": "maxItems validation", + "schema": {"maxItems": 2}, + "tests": [ + { + "description": "shorter is valid", + "data": [1], + "valid": true + }, + { + "description": "exact length is valid", + "data": [1, 2], + "valid": true + }, + { + "description": "too long is invalid", + "data": [1, 2, 3], + "valid": false + }, + { + "description": "ignores non-arrays", + "data": "foobar", + "valid": true + } + ] + } +] |
