Bug 22440: (follow-up) Nothing is forever
This patch picks (yet) another class for testing purposes. The class needs to not implement to_api() and to_api_mapping(). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
2056b5ecec
commit
b22f017a16
1 changed files with 4 additions and 4 deletions
|
@ -270,8 +270,8 @@ subtest "to_api() tests" => sub {
|
|||
ok( !exists $api_city->{postal_code}, 'Attribute removed' );
|
||||
|
||||
# Pick a class that won't have a mapping for the API
|
||||
my $illrequest = $builder->build_object({ class => 'Koha::Illrequests' });
|
||||
is_deeply( $illrequest->to_api, $illrequest->TO_JSON, 'If no overloaded to_api_mapping method, return TO_JSON' );
|
||||
my $action_log = $builder->build_object({ class => 'Koha::ActionLogs' });
|
||||
is_deeply( $action_log->to_api, $action_log->TO_JSON, 'If no overloaded to_api_mapping method, return TO_JSON' );
|
||||
|
||||
my $biblio = $builder->build_sample_biblio();
|
||||
my $item = $builder->build_sample_item({ biblionumber => $biblio->biblionumber });
|
||||
|
@ -545,8 +545,8 @@ subtest "to_api_mapping() tests" => sub {
|
|||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
my $illrequest = $builder->build_object({ class => 'Koha::Illrequests' });
|
||||
is_deeply( $illrequest->to_api_mapping, {}, 'If no to_api_mapping present, return empty hashref' );
|
||||
my $action_log = $builder->build_object({ class => 'Koha::ActionLogs' });
|
||||
is_deeply( $action_log->to_api_mapping, {}, 'If no to_api_mapping present, return empty hashref' );
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue