Bug 27908: Add unit test

Signed-off-by: Christopher Kellermeyer - Altadena Library District <ckellermeyer@altadenalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle Hall 2021-03-10 10:45:15 -05:00
parent 19721bd671
commit 812a95279e

View file

@ -525,7 +525,7 @@ subtest checkin_withdrawn => sub {
};
subtest item_circulation_status => sub {
plan tests => 6;
plan tests => 7;
my $library = $builder->build_object( { class => 'Koha::Libraries' } );
my $library2 = $builder->build_object( { class => 'Koha::Libraries' } );
@ -596,5 +596,12 @@ subtest item_circulation_status => sub {
$status = $sip_item->sip_circulation_status;
is( $status, '02', "Item circulation status is on order" );
$item->notforloan($nfl)->store();
my $damaged = $item->damaged;
$item->damaged(1)->store();
$sip_item = C4::SIP::ILS::Item->new( $item->barcode );
$status = $sip_item->sip_circulation_status;
is( $status, '01', "Item circulation status is damaged" );
$item->damaged(0)->store();
};
$schema->storage->txn_rollback;