Bugzilla – Attachment 90535 Details for
Bug 23104
Regression (18925) in circ rules - unlimited vs 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23104: Add tests
Bug-23104-Add-tests.patch (text/plain), 1.53 KB, created by
Mark Tompsett
on 2019-06-12 17:45:25 UTC
(
hide
)
Description:
Bug 23104: Add tests
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2019-06-12 17:45:25 UTC
Size:
1.53 KB
patch
obsolete
>From 5f5e2d396c1e051719b588943c5051d865006fd2 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 12 Jun 2019 09:12:23 -0500 >Subject: [PATCH] Bug 23104: Add tests > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > t/db_dependent/Circulation/TooMany.t | 22 +++++++++++++++++++++- > 1 file changed, 21 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Circulation/TooMany.t b/t/db_dependent/Circulation/TooMany.t >index 1f1c6a7ee0..577a0dada9 100644 >--- a/t/db_dependent/Circulation/TooMany.t >+++ b/t/db_dependent/Circulation/TooMany.t >@@ -15,7 +15,7 @@ > # with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 8; >+use Test::More tests => 9; > use C4::Context; > > use C4::Members; >@@ -658,9 +658,29 @@ subtest 'General vs specific rules limit quantity correctly' => sub { > undef, > 'We are allowed one from the branch specifically now' > ); >+}; > >+subtest 'empty string means unlimited' => sub { >+ plan tests => 1; > >+ Koha::CirculationRules->set_rules( >+ { >+ branchcode => '*', >+ categorycode => '*', >+ itemtype => '*', >+ rules => { >+ maxissueqty => '', >+ maxonsiteissueqty => 0, >+ } >+ }, >+ ); >+ is( >+ C4::Circulation::TooMany( $patron, $biblio->{biblionumber}, $item ), >+ undef, >+ 'maxissueqty="" should mean unlimited' >+ ); > >+ teardown(); > }; > > $schema->storage->txn_rollback; >-- >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 23104
:
90532
|
90533
|
90535
|
90536
|
90581
|
90666
|
90691
|
90692
|
90693
|
90694