Bugzilla – Attachment 67728 Details for
Bug 14919
Holds history for patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14919: Add test for Koha::Patron->old_holds subroutine
Bug-14919-Add-test-for-KohaPatron-oldholds-subrout.patch (text/plain), 1.60 KB, created by
Josef Moravec
on 2017-10-06 15:52:42 UTC
(
hide
)
Description:
Bug 14919: Add test for Koha::Patron->old_holds subroutine
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2017-10-06 15:52:42 UTC
Size:
1.60 KB
patch
obsolete
>From 750668ed6fb85b38f0b4318317eca94a81d12837 Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Fri, 6 Oct 2017 08:03:56 +0000 >Subject: [PATCH] Bug 14919: Add test for Koha::Patron->old_holds subroutine > >--- > t/db_dependent/Koha/Patrons.t | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/Patrons.t b/t/db_dependent/Koha/Patrons.t >index a0a19fd..bea2a02 100644 >--- a/t/db_dependent/Koha/Patrons.t >+++ b/t/db_dependent/Koha/Patrons.t >@@ -615,8 +615,8 @@ subtest 'search_upcoming_membership_expires' => sub { > Koha::Patrons->search({ borrowernumber => { in => [ $patron_1->{borrowernumber}, $patron_2->{borrowernumber}, $patron_3->{borrowernumber} ] } })->delete; > }; > >-subtest 'holds' => sub { >- plan tests => 3; >+subtest 'holds and old_holds' => sub { >+ plan tests => 6; > > my $library = $builder->build( { source => 'Branch' } ); > my ($biblionumber_1) = AddBiblio( MARC::Record->new, '' ); >@@ -673,6 +673,18 @@ subtest 'holds' => sub { > $holds = $patron->holds; > is( $holds->count, 2, 'There should be 2 holds placed by this patron' ); > >+ my $old_holds = $patron->old_holds; >+ is( ref($old_holds), 'Koha::Old::Holds', >+ 'Koha::Patron->old_holds should return a Koha::Old::Holds objects' ); >+ is( $old_holds->count, 0, 'There should not be any old holds yet'); >+ >+ my $hold = $holds->next; >+ $hold->cancel; >+ >+ $old_holds = $patron->old_holds; >+ is( $old_holds->count, 1, 'There should be 1 old (cancelled) hold'); >+ >+ $old_holds->delete; > $holds->delete; > $patron->delete; > }; >-- >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 14919
:
67728
|
67729
|
67730
|
67807
|
67808
|
67809
|
67810
|
67811
|
67818
|
67988
|
68133
|
68134
|
68135
|
68136
|
68137
|
68138
|
68695
|
68696
|
68697
|
68698
|
68699
|
68700
|
68701
|
68756
|
68780