Lines 25-31
use Test::Mojo;
Link Here
|
25 |
use t::lib::TestBuilder; |
25 |
use t::lib::TestBuilder; |
26 |
use t::lib::Mocks; |
26 |
use t::lib::Mocks; |
27 |
|
27 |
|
28 |
use JSON qw(encode_json); |
28 |
use JSON qw(encode_json); |
29 |
use Array::Utils qw( array_minus ); |
29 |
use Array::Utils qw( array_minus ); |
30 |
|
30 |
|
31 |
use Koha::ERM::EUsage::CounterFiles; |
31 |
use Koha::ERM::EUsage::CounterFiles; |
Lines 96-103
subtest 'get() tests' => sub {
Link Here
|
96 |
my $q = encode_json( { "url" => $service_url } ); |
96 |
my $q = encode_json( { "url" => $service_url } ); |
97 |
my $sushi_service = $t->get_ok("//$userid:$password@/api/v1/erm/sushi_service?q=$q")->status_is(200)->tx->res->json; |
97 |
my $sushi_service = $t->get_ok("//$userid:$password@/api/v1/erm/sushi_service?q=$q")->status_is(200)->tx->res->json; |
98 |
|
98 |
|
99 |
my @response_fields = map { $_ } keys %$sushi_service; |
99 |
my @response_fields = map { $_ } keys %$sushi_service; |
100 |
my @new_fields_in_response = array_minus( @response_fields, @expected_fields ); |
100 |
my @new_fields_in_response = array_minus( @response_fields, @expected_fields ); |
101 |
|
101 |
|
102 |
is(scalar(@new_fields_in_response), 0, 'The response fields match the expected fields'); |
102 |
is( scalar(@new_fields_in_response), 0, 'The response fields match the expected fields' ); |
103 |
}; |
103 |
}; |
104 |
- |
|
|