Bugzilla – Attachment 125733 Details for
Bug 3142
Standardize how OPAC and staff determine requestability
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3142: Add test for the circ rule
Bug-3142-Add-test-for-the-circ-rule.patch (text/plain), 1.65 KB, created by
Jonathan Druart
on 2021-10-05 12:33:14 UTC
(
hide
)
Description:
Bug 3142: Add test for the circ rule
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-05 12:33:14 UTC
Size:
1.65 KB
patch
obsolete
>From 3b5a156076b768c333e5973e16c64486bc262924 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 5 Oct 2021 14:30:49 +0200 >Subject: [PATCH] Bug 3142: Add test for the circ rule > >--- > t/db_dependent/Koha/Items.t | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t >index d8aed21754c..80e2b7b604a 100755 >--- a/t/db_dependent/Koha/Items.t >+++ b/t/db_dependent/Koha/Items.t >@@ -1510,7 +1510,7 @@ subtest 'can_be_transferred' => sub { > }; > > subtest 'filter_by_for_hold' => sub { >- plan tests => 8; >+ plan tests => 9; > > my $biblio = $builder->build_sample_biblio; > is( $biblio->items->filter_by_for_hold->count, 0, 'no item yet' ); >@@ -1536,6 +1536,23 @@ subtest 'filter_by_for_hold' => sub { > t::lib::Mocks::mock_preference('AllowHoldsOnDamagedItems', 1); > is( $biblio->items->filter_by_for_hold->count, 6, '6 items for hold - damaged if AllowHoldsOnDamagedItems' ); > >+ my $not_holdable_itemtype = $builder->build_object({ class => 'Koha::ItemTypes' })->itemtype; >+ $builder->build_sample_item( >+ { >+ biblionumber => $biblio->biblionumber, >+ itype => $not_holdable_itemtype, >+ } >+ ); >+ Koha::CirculationRules->set_rule( >+ { >+ branchcode => undef, >+ itemtype => $not_holdable_itemtype, >+ rule_name => 'holdallowed', >+ rule_value => 'not_allowed', >+ } >+ ); >+ is( $biblio->items->filter_by_for_hold->count, 6, '6 items for hold - holdallowed=not_allowed' ); >+ > $biblio->delete; > }; > >-- >2.25.1
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 3142
:
122284
|
122285
|
122286
|
122287
|
122314
|
122315
|
122316
|
122317
|
125727
|
125728
|
125729
|
125730
|
125732
|
125733
|
125734
|
125942
|
125943
|
125944
|
125945
|
125946
|
125947
|
125948
|
125949
|
125950
|
125951
|
125956
|
125967
|
125968
|
125969
|
125970
|
125971
|
125972
|
125973
|
125974
|
125975
|
125976
|
125977