Bugzilla – Attachment 85905 Details for
Bug 20664
Optimize retrieval of biblio and item data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20664: (follow-up) Add tests for UseHidingRulesWithBorrowerCategory
Bug-20664-follow-up-Add-tests-for-UseHidingRulesWi.patch (text/plain), 1.77 KB, created by
Ere Maijala
on 2019-03-01 14:18:04 UTC
(
hide
)
Description:
Bug 20664: (follow-up) Add tests for UseHidingRulesWithBorrowerCategory
Filename:
MIME Type:
Creator:
Ere Maijala
Created:
2019-03-01 14:18:04 UTC
Size:
1.77 KB
patch
obsolete
>From adb3fa50ed7e890dde10865768256b9a40ada4cf Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Fri, 1 Mar 2019 16:13:25 +0200 >Subject: [PATCH] Bug 20664: (follow-up) Add tests for > UseHidingRulesWithBorrowerCategory > >--- > t/db_dependent/Items.t | 21 +++++++++++++++++++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index ba8e332820..baadf59743 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -34,7 +34,7 @@ use Koha::AuthorisedValues; > use t::lib::Mocks; > use t::lib::TestBuilder; > >-use Test::More tests => 17; >+use Test::More tests => 18; > > use Test::Warn; > >@@ -1124,4 +1124,21 @@ subtest 'tests for GetMarcItemFields' => sub { > is_deeply( $item3_marc->field($itemtag), @$marc_items[0], "We should get the third item when explicitly requested"); > > $schema->storage->txn_rollback; >-}; >\ No newline at end of file >+}; >+ >+subtest 'tests for UseHidingRulesWithBorrowerCategory' => sub { >+ plan tests => 6; >+ >+ t::lib::Mocks::mock_preference('OpacHiddenItemsExceptions', ''); >+ >+ is(C4::Items::UseHidingRulesWithBorrowerCategory('PT'), 1, 'Hiding rules used for category PT'); >+ is(C4::Items::UseHidingRulesWithBorrowerCategory('S'), 1, 'Hiding rules used for category S'); >+ >+ t::lib::Mocks::mock_preference('OpacHiddenItemsExceptions', 'S|L'); >+ >+ is(C4::Items::UseHidingRulesWithBorrowerCategory('PT'), 1, 'Hiding rules used for category PT'); >+ is(C4::Items::UseHidingRulesWithBorrowerCategory('S'), 0, 'Hiding rules ignored for category S'); >+ is(C4::Items::UseHidingRulesWithBorrowerCategory('L'), 0, 'Hiding rules ignored for category L'); >+ >+ is(C4::Items::UseHidingRulesWithBorrowerCategory(), 1, 'Hiding rules used for unspecified category'); >+}; >-- >2.17.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 20664
:
74873
|
75968
|
76045
|
76046
|
76669
|
78868
|
78869
|
78870
|
79225
|
79227
|
79228
|
79229
|
79276
|
79277
|
79278
|
79279
|
84516
|
84517
|
84518
|
84519
|
84520
|
85106
|
85107
|
85108
|
85109
|
85110
|
85776
|
85777
|
85778
|
85779
|
85780
|
85781
|
85898
|
85899
|
85900
|
85901
|
85902
|
85903
|
85904
|
85905
|
86002
|
86003
|
86004
|
86005
|
86006
|
86007
|
86008
|
86009