File: issue-71-additionalproperties.t

package info (click to toggle)
libjson-validator-perl 3.06%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 616 kB
  • sloc: perl: 1,308; makefile: 6
file content (15 lines) | stat: -rw-r--r-- 341 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use lib '.';
use t::Helper;
use Test::More;

my $schema = {
  required             => ['link'],
  type                 => 'object',
  additionalProperties => false,
  properties           => {link => {format => 'uri'}},
};

validate_ok {haha => 'hehe', link => 'http://a'}, $schema,
  E('/', 'Properties not allowed: haha.');

done_testing;