From b2921c443cd5827d1b459b072b44072c8fe2aa99 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Mon, 1 Oct 2018 15:04:44 +0100 Subject: [PATCH] Bug 20563: (follow-up) Add unit test This unit test tests the fetching of the requested_partners embed, if specified. --- t/db_dependent/Illrequests.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Illrequests.t b/t/db_dependent/Illrequests.t index 761de9f12b..0f6fee4664 100644 --- a/t/db_dependent/Illrequests.t +++ b/t/db_dependent/Illrequests.t @@ -807,7 +807,7 @@ subtest 'Checking Limits' => sub { subtest 'TO_JSON() tests' => sub { - plan tests => 10; + plan tests => 11; my $illreqmodule = Test::MockModule->new('Koha::Illrequest'); @@ -839,6 +839,8 @@ subtest 'TO_JSON() tests' => sub { undef, '%embed not passed, no \'capabilities\' attribute' ); is( $illreq_json->{library}, undef, '%embed not passed, no \'library\' attribute' ); + is( $illreq_json->{requested_partners}, + undef, '%embed not passed, no \'requested_partners\' attribute' ); $illreq_json = $illreq->TO_JSON( { patron => 1, metadata => 1, capabilities => 1, library => 1 } ); -- 2.11.0