Bug 14598: [QA Follow-up] Small changes
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 28 Oct 2016 07:54:20 +0000 (09:54 +0200)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 28 Oct 2016 11:29:59 +0000 (11:29 +0000)
[1] Renames the dbrev version to XXX; adding a my for $sth, although
    not strictly necessary it feels better.
[2] Circulation.t stumbles over:
    Undefined subroutine &C4::Circulation::GetItem called at ... line 1283.
    Somehow this is related to use_ok instead of a regular use.
    Worked around this by require_ok and adding a regular use.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
installer/data/mysql/updatedatabase.pl
t/db_dependent/Circulation.t

index 5aadb15..0061183 100755 (executable)
@@ -13344,10 +13344,10 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
-$DBversion = "3.23.00.XXX";
+$DBversion = "XXX";
 if ( CheckVersion($DBversion) ) {
 
-    $sth = $dbh->prepare(q{
+    my $sth = $dbh->prepare(q{
         SELECT s.itemnumber, i.itype, b.itemtype
         FROM
          ( SELECT DISTINCT itemnumber
index 18d1c87..8350ac0 100755 (executable)
 
 use Modern::Perl;
 
+use Test::More tests => 88;
+
+BEGIN {
+    require_ok('C4::Circulation');
+}
+
 use DateTime;
+
 use t::lib::Mocks;
+use t::lib::TestBuilder;
+
+use C4::Circulation;
 use C4::Biblio;
 use C4::Items;
 use C4::Members;
@@ -27,13 +37,6 @@ use C4::Overdues qw(UpdateFine CalcFine);
 use Koha::DateUtils;
 use Koha::Database;
 
-use t::lib::TestBuilder;
-
-use Test::More tests => 88;
-
-BEGIN {
-    use_ok('C4::Circulation');
-}
 
 my $schema = Koha::Database->schema;
 $schema->storage->txn_begin;