Bugzilla – Attachment 31265 Details for
Bug 12467
Lost items marked as not on loan even if they are!
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12467 [QA Followup] - Unit Tests
Bug-12467-QA-Followup---Unit-Tests.patch (text/plain), 1.81 KB, created by
Kyle M Hall (khall)
on 2014-08-28 17:47:43 UTC
(
hide
)
Description:
Bug 12467 [QA Followup] - Unit Tests
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-08-28 17:47:43 UTC
Size:
1.81 KB
patch
obsolete
>From 1b60807c92cdbec83b2266b3c428103167787704 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 28 Aug 2014 13:47:18 -0400 >Subject: [PATCH] Bug 12467 [QA Followup] - Unit Tests > >--- > t/db_dependent/Circulation.t | 12 ++++++++++-- > 1 files changed, 10 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t >index 4bc565f..add415b 100755 >--- a/t/db_dependent/Circulation.t >+++ b/t/db_dependent/Circulation.t >@@ -24,14 +24,16 @@ use C4::Items; > use C4::Members; > use C4::Reserves; > use Koha::DateUtils; >+use Koha::Database; > >-use Test::More tests => 49; >+use Test::More tests => 51; > > BEGIN { > use_ok('C4::Circulation'); > } > > my $dbh = C4::Context->dbh; >+my $schema = Koha::Database->new()->schema(); > > # Start transaction > $dbh->{AutoCommit} = 0; >@@ -351,6 +353,9 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > > LostItem( $itemnumber, 1 ); > >+ my $item = $schema->resultset('Item')->find( $itemnumber ); >+ ok( !$item->onloan(), "Lost item marked as returned has onloan = undef" ); >+ > my $total_due = $dbh->selectrow_array( > 'SELECT SUM( amountoutstanding ) FROM accountlines WHERE borrowernumber = ?', > undef, $renewing_borrower->{borrowernumber} >@@ -366,7 +371,10 @@ C4::Context->dbh->do("DELETE FROM accountlines"); > C4::Overdues::UpdateFine( $itemnumber2, $renewing_borrower->{borrowernumber}, > 15.00, q{}, Koha::DateUtils::output_pref($datedue) ); > >- LostItem( $itemnumber2, 1 ); >+ LostItem( $itemnumber2, 0 ); >+ >+ my $item2 = $schema->resultset('Item')->find( $itemnumber2 ); >+ ok( $item2->onloan(), "Lost item *not* marked as returned has onloan = 1" ); > > $total_due = $dbh->selectrow_array( > 'SELECT SUM( amountoutstanding ) FROM accountlines WHERE borrowernumber = ?', >-- >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 12467
:
29175
|
30766
|
30897
|
31265
|
31266