Bug 12406: adding the column maxsuspensiondays in the tests
authorYohann Dufour <dufour.yohann@gmail.com>
Wed, 11 Jun 2014 14:26:18 +0000 (16:26 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 18 Jun 2014 18:26:32 +0000 (15:26 -0300)
The column maxsuspensiondays was added in the datatable but not in the tests, which caused the failure of the tests

test plan: execute prove t/db_dependent/Circulation_Issuingrule.t
The command has to print:
t/db_dependent/Circulation_Issuingrule.t .. ok
All tests successful.
Files=1, Tests=9,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.35 cusr  0.08 csys =  1.47 CPU)
Result: PASS

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Failure on test before patch, success after
No koha-qa errors

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
t/db_dependent/Circulation_Issuingrule.t

index 7ab439b..09a36f8 100644 (file)
@@ -129,7 +129,8 @@ my $sampleissuingrule1 = {
     renewalsallowed    => 0,
     firstremind        => 0,
     itemtype           => 'BOOK',
-    categorycode       => $samplecat->{categorycode}
+    categorycode       => $samplecat->{categorycode},
+    maxsuspensiondays  => 0,
 };
 my $sampleissuingrule2 = {
     branchcode         => $samplebranch2->{branchcode},
@@ -153,7 +154,8 @@ my $sampleissuingrule2 = {
     accountsent        => 'Null',
     reservecharge      => 'Null',
     chargename         => 'Null',
-    restrictedtype     => 'Null'
+    restrictedtype     => 'Null',
+    maxsuspensiondays  => 0,
 };
 my $sampleissuingrule3 = {
     branchcode         => $samplebranch1->{branchcode},
@@ -177,7 +179,8 @@ my $sampleissuingrule3 = {
     accountsent        => 'Null',
     reservecharge      => 'Null',
     chargename         => 'Null',
-    restrictedtype     => 'Null'
+    restrictedtype     => 'Null',
+    maxsuspensiondays  => 0,
 };
 $query = 'INSERT INTO issuingrules (
                 branchcode,
@@ -201,8 +204,9 @@ $query = 'INSERT INTO issuingrules (
                 accountsent,
                 reservecharge,
                 chargename,
-                restrictedtype
-                ) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)';
+                restrictedtype,
+                maxsuspensiondays
+                ) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)';
 my $sth = $dbh->prepare($query);
 $sth->execute(
     $sampleissuingrule1->{branchcode},
@@ -226,7 +230,8 @@ $sth->execute(
     $sampleissuingrule1->{accountsent},
     $sampleissuingrule1->{reservecharge},
     $sampleissuingrule1->{chargename},
-    $sampleissuingrule1->{restrictedtype}
+    $sampleissuingrule1->{restrictedtype},
+    $sampleissuingrule1->{maxsuspensiondays},
 );
 $sth->execute(
     $sampleissuingrule2->{branchcode},
@@ -250,7 +255,8 @@ $sth->execute(
     $sampleissuingrule2->{accountsent},
     $sampleissuingrule2->{reservecharge},
     $sampleissuingrule2->{chargename},
-    $sampleissuingrule2->{restrictedtype}
+    $sampleissuingrule2->{restrictedtype},
+    $sampleissuingrule2->{maxsuspensiondays},
 );
 $sth->execute(
     $sampleissuingrule3->{branchcode},
@@ -274,7 +280,8 @@ $sth->execute(
     $sampleissuingrule3->{accountsent},
     $sampleissuingrule3->{reservecharge},
     $sampleissuingrule3->{chargename},
-    $sampleissuingrule3->{restrictedtype}
+    $sampleissuingrule3->{restrictedtype},
+    $sampleissuingrule3->{maxsuspensiondays},
 );
 
 is_deeply(