Bugzilla – Attachment 116311 Details for
Bug 27589
Error when specifying CR field in SIP Config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27589: Unit test
Bug-27589-Unit-test.patch (text/plain), 1.68 KB, created by
Nick Clemens (kidclamp)
on 2021-02-04 12:06:19 UTC
(
hide
)
Description:
Bug 27589: Unit test
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2021-02-04 12:06:19 UTC
Size:
1.68 KB
patch
obsolete
>From 157a398fe73fc74f99dbb3a6d323705c60e6bd7a Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 4 Feb 2021 11:59:11 +0000 >Subject: [PATCH] Bug 27589: Unit test > >Previous tests only covered CHECKIN, this adds a test for ITEM_INFORMATION >--- > t/db_dependent/SIP/Message.t | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/Message.t b/t/db_dependent/SIP/Message.t >index 8315ccc7de..8d04fb30f6 100755 >--- a/t/db_dependent/SIP/Message.t >+++ b/t/db_dependent/SIP/Message.t >@@ -199,7 +199,7 @@ subtest "Test build_additional_item_fields_string" => sub { > }; > > subtest "Test cr_item_field" => sub { >- plan tests => 1; >+ plan tests => 2; > > my $builder = t::lib::TestBuilder->new(); > my $branchcode = $builder->build({ source => 'Branch' })->{branchcode}; >@@ -253,6 +253,24 @@ subtest "Test cr_item_field" => sub { > > my $id = $item_object->id; > ok( $response =~ m/CR$id/, "Found correct CR field in response"); >+ >+ $siprequest = ITEM_INFORMATION . 'YYYYMMDDZZZZHHMMSS' . >+ FID_INST_ID . $branchcode . '|'. >+ FID_ITEM_ID . $item_object->barcode . '|' . >+ FID_TERMINAL_PWD . 'ignored' . '|'; >+ undef $response; >+ $msg = C4::SIP::Sip::MsgType->new( $siprequest, 0 ); >+ >+ $mockILS->mock( 'find_item', sub { >+ return C4::SIP::ILS::Item->new( $item_object->barcode ); >+ }); >+ >+ $server->{account}->{cr_item_field} = 'itype'; >+ >+ $msg->handle_item_information( $server ); >+ >+ my $itype = $item_object->itype; >+ ok( $response =~ m/CR$itype/, "Found correct CR field in response"); > }; > > subtest 'Patron info summary > 5 should not crash server' => sub { >-- >2.11.0
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 27589
:
116311
|
116312
|
116313
|
116315
|
116316
|
116317
|
116318