opnsense-src/tests/schema/maxLength.json
Baptiste Daroussin bfc6d68337 Update 20140302
In particular this brings schema validation support.
2014-03-22 17:22:29 +00:00

28 lines
697 B
JSON

[
{
"description": "maxLength validation",
"schema": {"maxLength": 2},
"tests": [
{
"description": "shorter is valid",
"data": "f",
"valid": true
},
{
"description": "exact length is valid",
"data": "fo",
"valid": true
},
{
"description": "too long is invalid",
"data": "foo",
"valid": false
},
{
"description": "ignores non-strings",
"data": 10,
"valid": true
}
]
}
]