diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t index 3f3b509463..f0db09403f 100755 --- a/t/db_dependent/SIP/Message.t +++ b/t/db_dependent/SIP/Message.t @@ -1385,6 +1385,14 @@ sub test_checkin_v2 { my $card1 = $patron1->{cardnumber}; my $sip_patron1 = C4::SIP::ILS::Patron->new($card1); $findpatron = $sip_patron1; + + # Create itemtype with sip_magnetic = 0 to ensure alert flag tests work correctly + my $itemtype_obj = $builder->build_object( + { + class => 'Koha::ItemTypes', + value => { sip_magnetic => 0 }, + } + ); my $item_object = $builder->build_sample_item( { damaged => 0, @@ -1393,6 +1401,7 @@ sub test_checkin_v2 { restricted => 0, homebranch => $branchcode, holdingbranch => $branchcode, + itype => $itemtype_obj->itemtype, } ); @@ -1679,6 +1688,14 @@ sub test_checkout_desensitize { my $sip_patron1 = C4::SIP::ILS::Patron->new($card1); my $patron_category = $sip_patron1->ptype(); $findpatron = $sip_patron1; + + # Create itemtype with sip_magnetic = 0 to ensure desensitize tests work correctly + my $itemtype_obj = $builder->build_object( + { + class => 'Koha::ItemTypes', + value => { sip_magnetic => 0 }, + } + ); my $item_object = $builder->build_sample_item( { damaged => 0, @@ -1687,6 +1704,7 @@ sub test_checkout_desensitize { restricted => 0, homebranch => $branchcode, holdingbranch => $branchcode, + itype => $itemtype_obj->itemtype, } ); my $itemtype = $item_object->effective_itemtype; @@ -1873,6 +1891,14 @@ sub test_renew_desensitize { my $sip_patron1 = C4::SIP::ILS::Patron->new($card1); my $patron_category = $sip_patron1->ptype(); $findpatron = $sip_patron1; + + # Create itemtype with sip_magnetic = 0 to ensure desensitize tests work correctly + my $itemtype_obj = $builder->build_object( + { + class => 'Koha::ItemTypes', + value => { sip_magnetic => 0 }, + } + ); my $item_object = $builder->build_sample_item( { damaged => 0, @@ -1881,6 +1907,7 @@ sub test_renew_desensitize { restricted => 0, homebranch => $branchcode, holdingbranch => $branchcode, + itype => $itemtype_obj->itemtype, } ); my $itemtype = $item_object->effective_itemtype;