Bugzilla – Attachment 42734 Details for
Bug 14733
Prevent a record from having holds with duplicate priorities
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14733 - Unit Tests
Bug-14733---Unit-Tests.patch (text/plain), 1.83 KB, created by
Jonathan Druart
on 2015-09-21 15:46:28 UTC
(
hide
)
Description:
Bug 14733 - Unit Tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-09-21 15:46:28 UTC
Size:
1.83 KB
patch
obsolete
>From b41f9b4b90172274d6fb1c4c103bd062fe84f7c4 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 26 Aug 2015 11:42:14 -0400 >Subject: [PATCH] Bug 14733 - Unit Tests > >Signed-off-by: Heather Braum <hbraum@nekls.org> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/Holds.t | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 82d6f62..3d2d7d8 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -6,7 +6,7 @@ use t::lib::Mocks; > use C4::Context; > use C4::Branch; > >-use Test::More tests => 51; >+use Test::More tests => 56; > use MARC::Record; > use C4::Biblio; > use C4::Items; >@@ -70,7 +70,7 @@ foreach my $borrowernumber ( @borrowernumbers ) { > $borrowernumber, > $biblionumber, > my $bibitems = q{}, >- my $priority, >+ my $priority = 1, > my $resdate, > my $expdate, > my $notes = q{}, >@@ -80,10 +80,14 @@ foreach my $borrowernumber ( @borrowernumbers ) { > ); > } > >- > my $reserves = GetReservesFromBiblionumber({ biblionumber => $biblionumber }); > is( scalar(@$reserves), $borrowers_count, "Test GetReserves()" ); > >+is( $reserves->[0]->{priority}, 1, "Reserve 1 has a priority of 1" ); >+is( $reserves->[1]->{priority}, 2, "Reserve 2 has a priority of 2" ); >+is( $reserves->[2]->{priority}, 3, "Reserve 3 has a priority of 3" ); >+is( $reserves->[3]->{priority}, 4, "Reserve 4 has a priority of 4" ); >+is( $reserves->[4]->{priority}, 5, "Reserve 5 has a priority of 5" ); > > my ( $reservedate, $borrowernumber, $branchcode, $reserve_id ) = GetReservesFromItemnumber($itemnumber); > is( $reservedate, output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 }), "GetReservesFromItemnumber should return a valid reserve date"); >-- >2.1.0
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 14733
:
41996
|
41997
|
41998
|
42658
|
42659
| 42734 |
42735
|
42736
|
42880