From 80c68171bdefeebf90a958af330d43514a687c5f Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 2 May 2014 22:00:45 +0000 Subject: [PATCH] Bug 10694: (follow-up) remove truncate table from test case Doing a truncate of a table in MySQL causes an implicit commit. Consequently, they should not be used in DB-dependent test cases, as they will cause the changes to NOT be rolled back. Signed-off-by: Galen Charlton --- t/db_dependent/Circulation_issue.t | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/db_dependent/Circulation_issue.t b/t/db_dependent/Circulation_issue.t index ea701318a6..be3a7754a6 100644 --- a/t/db_dependent/Circulation_issue.t +++ b/t/db_dependent/Circulation_issue.t @@ -331,12 +331,12 @@ is_deeply( "With issuing rules (renewal allowed, 1 remaining) and with a valid parameter, Getrenewcount of item1 returns 0 renews left" ); -$dbh->do("TRUNCATE TABLE old_issues"); +$dbh->do("DELETE FROM old_issues"); AddReturn('barcode_1'); my $return = $dbh->selectrow_hashref("SELECT DATE(returndate) AS return_date, CURRENT_DATE() AS today FROM old_issues LIMIT 1" ); ok( $return->{return_date} eq $return->{today}, "Item returned with no return date specified has todays date" ); -$dbh->do("TRUNCATE TABLE old_issues"); +$dbh->do("DELETE FROM old_issues"); C4::Circulation::AddIssue( $borrower_1, 'barcode_1', $daysago10, 0, $today ); AddReturn('barcode_1', undef, undef, undef, '2014-04-01 23:42'); $return = $dbh->selectrow_hashref("SELECT * FROM old_issues LIMIT 1" ); -- 2.20.1