Bugzilla – Attachment 179075 Details for
Bug 36431
Checkin does not show difference between WasTransfered and NeedsTransfer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36431: Unit tests
Bug-36431-Unit-tests.patch (text/plain), 2.43 KB, created by
Martin Renvoize (ashimema)
on 2025-03-07 12:36:17 UTC
(
hide
)
Description:
Bug 36431: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-03-07 12:36:17 UTC
Size:
2.43 KB
patch
obsolete
>From e56a3e8e30f84c0b2929d8f4c7855b3e69a29d02 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 22 Apr 2024 09:59:21 +0000 >Subject: [PATCH] Bug 36431: Unit tests > >Test plan: >Run t/db_dependent/SIP/Message.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/SIP/Message.t | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t >index 598eaef2f2a..777e73fe912 100755 >--- a/t/db_dependent/SIP/Message.t >+++ b/t/db_dependent/SIP/Message.t >@@ -108,7 +108,7 @@ subtest 'Test renew desensitize' => sub { > subtest 'Checkin V2' => sub { > my $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; >- plan tests => 40; >+ plan tests => 46; > $C4::SIP::Sip::protocol_version = 2; > test_checkin_v2(); > $schema->storage->txn_rollback; >@@ -1461,6 +1461,28 @@ sub test_checkin_v2 { > $item_object->holdingbranch($branchcode)->store(); > t::lib::Mocks::mock_preference( ' AllowReturnToBranch ', 'anywhere' ); > >+ # Change homebranch to trigger NeedsTransfer response (with and without automatic item return) >+ t::lib::Mocks::mock_preference( 'AutomaticItemReturn', 0 ); >+ $item_object->homebranch($branchcode2)->store(); >+ undef $response; >+ $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); >+ $msg->handle_checkin($server); >+ check_field( $respcode, $response, FID_ALERT_TYPE, '04', 'Got CV 04' ); >+ check_field( >+ $respcode, $response, FID_SCREEN_MSG, 'This item must still be transferred', 'Check screen msg', >+ 'regex' >+ ); >+ is( $item_object->transfer, undef, 'No transfer was started' ); >+ t::lib::Mocks::mock_preference( 'AutomaticItemReturn', 1 ); >+ undef $response; >+ $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); >+ $msg->handle_checkin($server); >+ check_field( $respcode, $response, FID_ALERT_TYPE, '04', 'Got CV 04' ); >+ check_field( $respcode, $response, FID_SCREEN_MSG, undef, 'No screen msg' ); >+ isnt( $item_object->transfer, undef, 'A transfer was started' ); >+ $item_object->transfer->delete; >+ $item_object->homebranch($branchcode)->store(); >+ > $server->{account}->{cv_send_00_on_success} = 0; > undef $response; > $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); >-- >2.48.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36431
:
165258
|
165259
|
176670
|
176671
|
176672
|
178323
|
178324
|
179074
| 179075