Debian Codegraph @

lemonldap-ng-manager/t/17-extra2f.t

raw
1 # Verify that bas changes are detected
2
3 use warnings;
4 use Test::More;
5 use strict;
6 use JSON;
7 require 't/test-lib.pm';
8
9 my $struct = 't/jsonfiles/17-extra2f.json';
10
11 my ( $len, $body ) = substitute_io_handle($struct);
12 my ( $res, $resBody );
13 ok(
14 $res =
15 &client->_post( '/confs/', 'cfgNum=1', $body, 'application/json', $len ),
16 "Request succeed"
17 );
18 ok( $res->[0] == 200, "Result code is 200" );
19 ok( $resBody = from_json( $res->[2]->[0] ), "Result body contains JSON text" );
20 ok( $resBody->{result} == 1, "JSON response contains \"result:1\"" )
21 or print STDERR Dumper($res);
22
23 ok( $res = &client->_get( '/confs/2/sfExtra', 'application/json' ),
24 'Get combModules' );
25 ok( $resBody = from_json( $res->[2]->[0] ), "Result body contains JSON text" );
26
27 count(6);
28
29 done_testing( count() );