From 2569dd79ca397c733c213944d2dfb0024336f55a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Mei=C3=9Fner?= Date: Mon, 19 May 2014 14:00:48 +0200 Subject: [PATCH] Bug 11577: Unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes a few unit tests that broke because of the new feature. To test: 1) prove t/db_dependent/Circulation.t 2) prove t/db_dependent/Circulation_Issuingrule.t 3) prove t/db_dependent/Circulation_issue.t Sponsored-by: Hochschule für Gesundheit (hsg), Germany --- t/db_dependent/Circulation.t | 3 +++ t/db_dependent/Circulation_Issuingrule.t | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 6b25208..e26d910 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -133,10 +133,12 @@ $dbh->do( q{INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed, maxissueqty, issuelength, lengthunit, renewalsallowed, renewalperiod, + norenewalbefore, auto_renew, fine, chargeperiod) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, + ?, ?, ?, ? ) }, @@ -144,6 +146,7 @@ $dbh->do( '*', '*', '*', 25, 20, 14, 'days', 1, 7, + '', 0, .10, 1 ); diff --git a/t/db_dependent/Circulation_Issuingrule.t b/t/db_dependent/Circulation_Issuingrule.t index 7ab439b..396d192 100644 --- a/t/db_dependent/Circulation_Issuingrule.t +++ b/t/db_dependent/Circulation_Issuingrule.t @@ -117,6 +117,7 @@ my $sampleissuingrule1 = { lengthunit => 'Null', renewalperiod => 5, norenewalbefore => 6, + auto_renew => 0, issuelength => 5, chargeperiod => 0, rentaldiscount => '2.000000', @@ -139,6 +140,7 @@ my $sampleissuingrule2 = { renewalsallowed => 'Null', renewalperiod => 2, norenewalbefore => 7, + auto_renew => 0, reservesallowed => 'Null', issuelength => 2, lengthunit => 'Null', @@ -163,6 +165,7 @@ my $sampleissuingrule3 = { renewalsallowed => 'Null', renewalperiod => 3, norenewalbefore => 8, + auto_renew => 0, reservesallowed => 'Null', issuelength => 3, lengthunit => 'Null', @@ -187,6 +190,7 @@ $query = 'INSERT INTO issuingrules ( renewalsallowed, renewalperiod, norenewalbefore, + auto_renew, reservesallowed, issuelength, lengthunit, @@ -202,7 +206,7 @@ $query = 'INSERT INTO issuingrules ( reservecharge, chargename, restrictedtype - ) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; + ) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; my $sth = $dbh->prepare($query); $sth->execute( $sampleissuingrule1->{branchcode}, @@ -212,6 +216,7 @@ $sth->execute( $sampleissuingrule1->{renewalsallowed}, $sampleissuingrule1->{renewalperiod}, $sampleissuingrule1->{norenewalbefore}, + $sampleissuingrule1->{auto_renew}, $sampleissuingrule1->{reservesallowed}, $sampleissuingrule1->{issuelength}, $sampleissuingrule1->{lengthunit}, @@ -236,6 +241,7 @@ $sth->execute( $sampleissuingrule2->{renewalsallowed}, $sampleissuingrule2->{renewalperiod}, $sampleissuingrule2->{norenewalbefore}, + $sampleissuingrule1->{auto_renew}, $sampleissuingrule2->{reservesallowed}, $sampleissuingrule2->{issuelength}, $sampleissuingrule2->{lengthunit}, @@ -260,6 +266,7 @@ $sth->execute( $sampleissuingrule3->{renewalsallowed}, $sampleissuingrule3->{renewalperiod}, $sampleissuingrule3->{norenewalbefore}, + $sampleissuingrule1->{auto_renew}, $sampleissuingrule3->{reservesallowed}, $sampleissuingrule3->{issuelength}, $sampleissuingrule3->{lengthunit}, -- 1.7.10.4