View | Details | Raw Unified | Return to bug 35757
Collapse All | Expand All

(-)a/t/db_dependent/api/v1/erm_counter_registries.t (-2 / +2 lines)
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 85-91 subtest 'get() tests' => sub { Link Here
85
    my $counter_registry =
85
    my $counter_registry =
86
        $t->get_ok("//$userid:$password@/api/v1/erm/counter_registry?q=$q")->status_is(200)->tx->res->json;
86
        $t->get_ok("//$userid:$password@/api/v1/erm/counter_registry?q=$q")->status_is(200)->tx->res->json;
87
87
88
    my $registry_to_check = @$counter_registry[0];
88
    my $registry_to_check      = @$counter_registry[0];
89
    my @response_fields        = map { $_ } keys %$registry_to_check;
89
    my @response_fields        = map { $_ } keys %$registry_to_check;
90
    my @new_fields_in_response = array_minus( @response_fields, @expected_fields );
90
    my @new_fields_in_response = array_minus( @response_fields, @expected_fields );
91
91
(-)a/t/db_dependent/api/v1/erm_sushi_services.t (-4 / +3 lines)
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
- 

Return to bug 35757