Bugzilla – Attachment 165259 Details for
Bug 36431
SIP2: 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.36 KB, created by
Marcel de Rooy
on 2024-04-22 10:04:28 UTC
(
hide
)
Description:
Bug 36431: Unit tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-04-22 10:04:28 UTC
Size:
2.36 KB
patch
obsolete
>From 2e46330941c9160239751cc5246fe5e8ad46014e 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 >Content-Type: text/plain; charset=utf-8 > >Test plan: >Run t/db_dependent/SIP/Message.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 c6c71bd294..6a88f99553 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; >@@ -1077,6 +1077,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.30.2
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