Bugzilla – Attachment 156171 Details for
Bug 34737
Enhance SIP2SortBinMapping to support additional match conditions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34737: Unit tests
Bug-34737-Unit-tests.patch (text/plain), 2.04 KB, created by
Martin Renvoize (ashimema)
on 2023-09-25 14:31:22 UTC
(
hide
)
Description:
Bug 34737: Unit tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-09-25 14:31:22 UTC
Size:
2.04 KB
patch
obsolete
>From d16bdc195731c0e62ba50c32ffaec4cd974a8dcf Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 7 Sep 2023 17:23:42 +0100 >Subject: [PATCH] Bug 34737: Unit tests > >This patch adds unit test to prove the multi-field match functionality >added in this patchset. > >Signed-off-by: Toni Ford <Toni.Ford@newcastle.gov.uk> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > t/db_dependent/SIP/Transaction.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/SIP/Transaction.t b/t/db_dependent/SIP/Transaction.t >index 232e6456a58..c979cc72572 100755 >--- a/t/db_dependent/SIP/Transaction.t >+++ b/t/db_dependent/SIP/Transaction.t >@@ -911,7 +911,7 @@ subtest checkin_withdrawn => sub { > }; > > subtest _get_sort_bin => sub { >- plan tests => 4; >+ plan tests => 5; > > my $library = $builder->build_object( { class => 'Koha::Libraries' } ); > my $branch = $library->branchcode; >@@ -927,6 +927,7 @@ $branch:itemcallnumber:<:600:3\r > $branch2:homebranch:ne:\$holdingbranch:X\r > $branch2:effective_itemtype:eq:CD:4\r > $branch2:itemcallnumber:>:600:5\r >+$branch2:effective_itemtype:eq:BOOK:ccode:eq:TEEN:6\r > RULES > t::lib::Mocks::mock_preference('SIP2SortBinMapping', $rules); > >@@ -945,6 +946,14 @@ RULES > } > ); > >+ my $item_book2 = $builder->build_sample_item( >+ { >+ library => $library2->branchcode, >+ itype => 'BOOK', >+ ccode => 'TEEN' >+ } >+ ); >+ > my $bin; > > # Set holdingbranch as though item returned to library other than homebranch (As AddReturn would) >@@ -961,6 +970,9 @@ RULES > $item_book->itemcallnumber('350.20')->store(); > $bin = C4::SIP::ILS::Transaction::Checkin::_get_sort_bin( $item_book, $library->branchcode ); > is($bin, '2', "Rules applied in order (< comparator)"); >+ >+ $bin = C4::SIP::ILS::Transaction::Checkin::_get_sort_bin( $item_book2, $library2->branchcode ); >+ is($bin, '6', "Rules with multiple field matches"); > }; > > subtest item_circulation_status => sub { >-- >2.41.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 34737
:
155328
|
155329
|
155330
|
155360
|
155361
|
155362
|
155663
|
155664
|
155665
|
155666
|
156147
|
156148
|
156170
| 156171 |
156172
|
156173
|
156174
|
156175
|
156176
|
156177
|
156314
|
156315