|
Lines 21-26
use Modern::Perl;
Link Here
|
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 1; |
22 |
use Test::More tests => 1; |
| 23 |
use Test::Mojo; |
23 |
use Test::Mojo; |
|
|
24 |
use Test::Warn; |
| 24 |
|
25 |
|
| 25 |
use t::lib::TestBuilder; |
26 |
use t::lib::TestBuilder; |
| 26 |
use t::lib::Mocks; |
27 |
use t::lib::Mocks; |
|
Lines 61-66
subtest 'get() tests' => sub {
Link Here
|
| 61 |
"id", |
62 |
"id", |
| 62 |
"ip_address_authorization", |
63 |
"ip_address_authorization", |
| 63 |
"ip_address_authorization_info", |
64 |
"ip_address_authorization_info", |
|
|
65 |
"last_audit", |
| 64 |
"migrations", |
66 |
"migrations", |
| 65 |
"notification_count", |
67 |
"notification_count", |
| 66 |
"notifications_url", |
68 |
"notifications_url", |
|
Lines 103-109
subtest 'get() tests' => sub {
Link Here
|
| 103 |
my @response_fields = map { $_ } keys %$sushi_service; |
105 |
my @response_fields = map { $_ } keys %$sushi_service; |
| 104 |
my @new_fields_in_response = array_minus( @response_fields, @expected_fields ); |
106 |
my @new_fields_in_response = array_minus( @response_fields, @expected_fields ); |
| 105 |
|
107 |
|
| 106 |
is( scalar(@new_fields_in_response), 0, 'The response fields match the expected fields' ); |
108 |
my $new_fields_string = |
|
|
109 |
"This is not a new error within Koha, the following new field(s) have been added to the API repsonse: " |
| 110 |
. join( ', ', @new_fields_in_response ) |
| 111 |
. '. They should be added to the API definition'; |
| 112 |
warning_like { scalar(@new_fields_in_response) } 0, $new_fields_string; |
| 107 |
|
113 |
|
| 108 |
$schema->storage->txn_rollback; |
114 |
$schema->storage->txn_rollback; |
| 109 |
}; |
115 |
}; |
| 110 |
- |
|
|