Bugzilla – Attachment 40247 Details for
Bug 13851
Replace waiting holds logic in circulation.pl with Koha Objects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13851 [QA Followup] - Unit Tests
Bug-13851-QA-Followup---Unit-Tests.patch (text/plain), 2.19 KB, created by
Kyle M Hall (khall)
on 2015-06-17 17:23:10 UTC
(
hide
)
Description:
Bug 13851 [QA Followup] - Unit Tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-06-17 17:23:10 UTC
Size:
2.19 KB
patch
obsolete
>From 5d992b4de025ffe7680daf0d16ae5b19835802a7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 16 Jun 2015 22:53:10 -0400 >Subject: [PATCH] Bug 13851 [QA Followup] - Unit Tests > >--- > t/db_dependent/Holds.t | 19 ++++++++++++++++++- > 1 files changed, 18 insertions(+), 1 deletions(-) > >diff --git a/t/db_dependent/Holds.t b/t/db_dependent/Holds.t >index 5a480d8..01e67db 100755 >--- a/t/db_dependent/Holds.t >+++ b/t/db_dependent/Holds.t >@@ -6,13 +6,15 @@ use t::lib::Mocks; > use C4::Context; > use C4::Branch; > >-use Test::More tests => 41; >+use Test::More tests => 49; > use MARC::Record; > use C4::Biblio; > use C4::Items; > use C4::Members; > use C4::Calendar; > >+use Koha::Holds; >+ > use Koha::DateUtils qw( dt_from_string output_pref ); > > BEGIN { >@@ -30,6 +32,7 @@ $dbh->{RaiseError} = 1; > my $borrowers_count = 5; > > $dbh->do('DELETE FROM itemtypes'); >+$dbh->do('DELETE FROM reserves'); > my $insert_sth = $dbh->prepare('INSERT INTO itemtypes (itemtype) VALUES (?)'); > $insert_sth->execute('CAN'); > $insert_sth->execute('CANNOT'); >@@ -88,6 +91,20 @@ is( $borrowernumber, $borrowernumbers[0], "GetReservesFromItemnumber should retu > is( $branchcode, 'CPL', "GetReservesFromItemnumber should return a valid branchcode"); > ok($reserve_id, "Test GetReservesFromItemnumber()"); > >+my $hold = Koha::Holds->find( $reserve_id ); >+ok( $hold, "Koha::Holds found the hold" ); >+my $hold_biblio = $hold->biblio(); >+ok( $hold_biblio, "Got biblio using biblio() method" ); >+ok( $hold_biblio == $hold->biblio(), "biblio method returns stashed biblio" ); >+my $hold_item = $hold->item(); >+ok( $hold_item, "Got item using item() method" ); >+ok( $hold_item == $hold->item(), "item method returns stashed item" ); >+my $hold_branch = $hold->branch(); >+ok( $hold_branch, "Got branch using branch() method" ); >+ok( $hold_branch == $hold->branch(), "branch method returns stashed branch" ); >+my $hold_found = $hold->found(); >+$hold->set({ found => 'W'})->store(); >+is( Koha::Holds->waiting()->count(), 1, "Koha::Holds->waiting returns waiting holds" ); > > my ( $reserve ) = GetReservesFromBorrowernumber($borrowernumbers[0]); > ok( $reserve->{'borrowernumber'} eq $borrowernumbers[0], "Test GetReservesFromBorrowernumber()"); >-- >1.7.2.5
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 13851
:
36947
|
37303
|
38175
|
39740
|
40028
|
40039
|
40247
|
40256
|
40257
|
40258
|
40668
|
40669
|
40670