Bugzilla – Attachment 57506 Details for
Bug 17599
Move C4::Circulation::GetIssuingRule to Koha::IssuingRules->get_effective_issuing_rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17599: Make the tests pass
Bug-17599-Make-the-tests-pass.patch (text/plain), 1.88 KB, created by
Jonathan Druart
on 2016-11-15 15:51:14 UTC
(
hide
)
Description:
Bug 17599: Make the tests pass
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-11-15 15:51:14 UTC
Size:
1.88 KB
patch
obsolete
>From ff77f729f31eff4d44b60808380bec3b4bd408cf Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 15 Nov 2016 15:49:00 +0000 >Subject: [PATCH] Bug 17599: Make the tests pass > >If you run TooMany or MultiplePerRecord.t after >t/db_dependent/Circulation/Returns.t (for instance) and that you are >running memcached, item-level_itypes will be 0. >These tests assume that the pref is 1 >--- > t/db_dependent/Circulation/TooMany.t | 1 + > t/db_dependent/Reserves/MultiplePerRecord.t | 3 +++ > 2 files changed, 4 insertions(+) > >diff --git a/t/db_dependent/Circulation/TooMany.t b/t/db_dependent/Circulation/TooMany.t >index d066809..0e129c3 100644 >--- a/t/db_dependent/Circulation/TooMany.t >+++ b/t/db_dependent/Circulation/TooMany.t >@@ -50,6 +50,7 @@ $dbh->do(q|DELETE FROM default_branch_item_rules|); > $dbh->do(q|DELETE FROM issuingrules|); > > my $builder = t::lib::TestBuilder->new(); >+t::lib::Mocks::mock_preference('item-level_itypes', 1); # Assuming the item type is defined at item level > > my $branch = $builder->build({ > source => 'Branch', >diff --git a/t/db_dependent/Reserves/MultiplePerRecord.t b/t/db_dependent/Reserves/MultiplePerRecord.t >index d2da653..559cef4 100755 >--- a/t/db_dependent/Reserves/MultiplePerRecord.t >+++ b/t/db_dependent/Reserves/MultiplePerRecord.t >@@ -21,6 +21,7 @@ use Modern::Perl; > > use Test::More tests => 38; > use t::lib::TestBuilder; >+use t::lib::Mocks; > > use C4::Reserves qw( GetMaxPatronHoldsForRecord AddReserve CanBookBeReserved ); > use Koha::Database; >@@ -119,6 +120,8 @@ my $rule1 = $rules_rs->new( > } > )->insert(); > >+t::lib::Mocks::mock_preference('item-level_itypes', 1); # Assuming the item type is defined at item level >+ > my $max = GetMaxPatronHoldsForRecord( $patron->{borrowernumber}, $biblio->{biblionumber} ); > is( $max, 1, 'GetMaxPatronHoldsForRecord returns max of 1' ); > my $rule = C4::Reserves::GetHoldRule( >-- >2.1.4
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 17599
:
57393
|
57494
|
57501
|
57502
|
57503
|
57504
| 57506