Bugzilla – Attachment 120619 Details for
Bug 28286
Place hold button not displayed when biblio has only Ordered items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28286: tests for "filter_by_for_hold" method
Bug-28286-tests-for-filterbyforhold-method.patch (text/plain), 1.53 KB, created by
Peter Vashchuk
on 2021-05-06 12:43:57 UTC
(
hide
)
Description:
Bug 28286: tests for "filter_by_for_hold" method
Filename:
MIME Type:
Creator:
Peter Vashchuk
Created:
2021-05-06 12:43:57 UTC
Size:
1.53 KB
patch
obsolete
>From bbe8dc1e461165956650130f755d27db79222c83 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Thu, 6 May 2021 15:43:15 +0300 >Subject: [PATCH] Bug 28286: tests for "filter_by_for_hold" method > >--- > t/db_dependent/Koha/Items.t | 17 ++++++++++++++++- > 1 file changed, 16 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/Items.t b/t/db_dependent/Koha/Items.t >index 73e1ab4a29..cffc15179a 100755 >--- a/t/db_dependent/Koha/Items.t >+++ b/t/db_dependent/Koha/Items.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 14; >+use Test::More tests => 15; > > use Test::MockModule; > use Test::Exception; >@@ -1483,6 +1483,21 @@ subtest 'filter_by_for_loan' => sub { > $biblio->delete; > }; > >+subtest 'filter_by_for_hold' => sub { >+ plan tests => 4; >+ >+ my $biblio = $builder->build_sample_biblio; >+ is( $biblio->items->filter_by_for_hold->count, 0, 'no item yet' ); >+ $builder->build_sample_item( { biblionumber => $biblio->biblionumber, notforloan => 1 } ); >+ is( $biblio->items->filter_by_for_hold->count, 0, 'no item for hold' ); >+ $builder->build_sample_item( { biblionumber => $biblio->biblionumber, notforloan => 0 } ); >+ is( $biblio->items->filter_by_for_hold->count, 1, '1 item for hold' ); >+ $builder->build_sample_item( { biblionumber => $biblio->biblionumber, notforloan => -1 } ); >+ is( $biblio->items->filter_by_for_hold->count, 2, '2 items for hold' ); >+ >+ $biblio->delete; >+}; >+ > # Reset nb_of_items prior to testing delete > $nb_of_items = Koha::Items->search->count; > >-- >2.31.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 28286
:
120521
|
120618
|
120619
|
120668
|
120672
|
120674
|
120701
|
120768