Bugzilla – Attachment 137827 Details for
Bug 31112
Able to renew checkout when the number of holds exceeds available number of items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31112: Remove unit test that forces specific internal implementation
Bug-31112-Remove-unit-test-that-forces-specific-in.patch (text/plain), 2.27 KB, created by
Joonas Kylmälä
on 2022-07-18 16:38:58 UTC
(
hide
)
Description:
Bug 31112: Remove unit test that forces specific internal implementation
Filename:
MIME Type:
Creator:
Joonas Kylmälä
Created:
2022-07-18 16:38:58 UTC
Size:
2.27 KB
patch
obsolete
>From cdbcba5af6ff4ae231a50f3cbcbf6ee803308f8f Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@iki.fi> >Date: Mon, 18 Jul 2022 16:29:06 +0000 >Subject: [PATCH] Bug 31112: Remove unit test that forces specific internal > implementation > >To test: > 1) Make sure tests still pass: > $ prove t/db_dependent/Circulation.t >--- > t/db_dependent/Circulation.t | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 84444a3bd0..6eb051717a 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -1640,7 +1640,7 @@ subtest "Bug 13841 - Do not create new 0 amount fines" => sub { > }; > > subtest "AllowRenewalIfOtherItemsAvailable tests" => sub { >- plan tests => 13; >+ plan tests => 12; > my $biblio = $builder->build_sample_biblio(); > my $item_1 = $builder->build_sample_item( > { >@@ -1816,7 +1816,6 @@ subtest "AllowRenewalIfOtherItemsAvailable tests" => sub { > > my $mock_circ = Test::MockModule->new("C4::Circulation"); > $mock_circ->mock( CanItemBeReserved => sub { >- warn "Checked"; > return { status => 'no' } > } ); > >@@ -1824,9 +1823,7 @@ subtest "AllowRenewalIfOtherItemsAvailable tests" => sub { > $item_3->delete(); > # Two items total, one item available, one issued, two holds on record > >- warnings_are{ >- ( $renewokay, $error ) = CanBookBeRenewed( $borrowernumber1, $item_1->itemnumber ); >- } [], "CanItemBeReserved not called when there are more possible holds than available items"; >+ ( $renewokay, $error ) = CanBookBeRenewed( $borrowernumber1, $item_1->itemnumber ); > is( $renewokay, 0, 'Borrower cannot renew when there are more holds than available items' ); > > $item_3 = $builder->build_sample_item( >@@ -1848,6 +1845,11 @@ subtest "AllowRenewalIfOtherItemsAvailable tests" => sub { > } > ); > >+ $mock_circ->mock( CanItemBeReserved => sub { >+ warn "Checked"; >+ return { status => 'no' } >+ } ); >+ > warnings_are{ > ( $renewokay, $error ) = CanBookBeRenewed( $borrowernumber1, $item_1->itemnumber ); > } ["Checked","Checked"], "CanItemBeReserved only called once per available item if it returns a negative result for all items for a borrower"; >-- >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 31112
:
137826
|
137827
|
137828
|
137856
|
137857
|
137858
|
139492
|
139493
|
139494
|
139495
|
139622
|
139623
|
139729
|
139730
|
139731
|
139732
|
139733
|
139734
|
139735