File: validate-id.t

package info (click to toggle)
libjson-validator-perl 5.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,160 kB
  • sloc: perl: 3,015; makefile: 14
file content (10 lines) | stat: -rw-r--r-- 287 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
use lib '.';
use t::Helper;

validate_ok {id => 1}, {type => 'object'};

validate_ok {id => 1, message => 'cannot exclude "id" #111'},
  {type => 'object', additionalProperties => 0, properties => {message => {type => "string"}}},
  E('/', 'Properties not allowed: id.');

done_testing;