Bugzilla – Attachment 176672 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.39 KB, created by
Kyle M Hall (khall)
on 2025-01-16 15:10:54 UTC
(
hide
)
Description:
Bug 36431: Unit tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2025-01-16 15:10:54 UTC
Size:
2.39 KB
patch
obsolete
>From 4f76ed1ed5fe850c93f4d559359473e4ea00e490 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> >--- > 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 dea011311a2..8c93e9bd95d 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; >@@ -1264,6 +1264,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.39.5 (Apple Git-154)
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