From df92a325e68d14c3706288faff3951458517b562 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 18 Feb 2020 10:37:58 +0100 Subject: [PATCH] Bug 7611: Adjust tests Signed-off-by: Joy Nelson --- t/db_dependent/XSLT.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/XSLT.t b/t/db_dependent/XSLT.t index cfec5e9f55..e8fa2190cb 100644 --- a/t/db_dependent/XSLT.t +++ b/t/db_dependent/XSLT.t @@ -34,7 +34,7 @@ my $builder = t::lib::TestBuilder->new; $schema->storage->txn_begin; subtest 'buildKohaItemsNamespace status tests' => sub { - plan tests => 12; + plan tests => 13; my $item = $builder->build_sample_item({}); my $xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); @@ -57,9 +57,11 @@ subtest 'buildKohaItemsNamespace status tests' => sub { like($xml,qr{reference},"reference if positive itemtype notforloan value"); Koha::ItemTypes->find($item->itype)->notforloan(0)->store; + my $substatus = Koha::AuthorisedValues->search({ category => 'NOT_LOAN', authorised_value => -1 })->next->lib; $item->notforloan(-1)->store; $xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); - like($xml,qr{On order},"On order if negative notforloan value"); + like($xml,qr{reallynotforloan},"reallynotforloan if negative notforloan value"); + like($xml,qr{$substatus},"substatus set if negative notforloan value"); $item->notforloan(1)->store; $xml = C4::XSLT::buildKohaItemsNamespace( $item->biblionumber,[]); -- 2.39.2