Bug 10653: (follow-up) minor tweaks to RotatingCollections tests
authorGalen Charlton <gmc@esilibrary.com>
Fri, 16 Aug 2013 16:09:13 +0000 (16:09 +0000)
committerChris Hall <followingthepath@gmail.com>
Mon, 21 Oct 2013 19:34:37 +0000 (08:34 +1300)
- remove unnecessary module import
- use parentheses for all C4 function calls

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 40aa42f31f10acad92da5f2c57319f049fba9289)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 800e1fc6d059b59a6aa0f5f0353c64ea1b606560)
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit 800e1fc6d059b59a6aa0f5f0353c64ea1b606560)
Signed-off-by: Chris Hall <followingthepath@gmail.com>
(cherry picked from commit d5cc7da52ac6d6e0fd21662c4f3ebc24c22d511b)

t/db_dependent/RotatingCollections.t

index 1a7764e..87a6ad4 100644 (file)
@@ -4,7 +4,6 @@ use Modern::Perl;
 
 use Test::More tests => 41;
 use C4::Context;
-use DBI;
 use C4::Branch;
 use C4::Biblio;
 
@@ -46,7 +45,7 @@ $dbh->do(q|DELETE FROM categories|);
 $dbh->do(q|DELETE FROM branchcategories|);
 
 #Test CreateCollection
-my $collections     = GetCollections;
+my $collections     = GetCollections();
 my $countcollection = scalar(@$collections);
 
 is( CreateCollection( 'Collection1', 'Description1' ),
@@ -55,7 +54,7 @@ my $collection_id1 = $dbh->last_insert_id( undef, undef, 'collections', undef );
 is( CreateCollection( 'Collection2', 'Description2' ),
     1, "All parameters have been given - Collection 2 added" );
 my $collection_id2 = $dbh->last_insert_id( undef, undef, 'collections', undef );
-$collections = GetCollections;
+$collections = GetCollections();
 is(
     scalar(@$collections),
     $countcollection + 2,
@@ -69,14 +68,14 @@ is(
     'No Title Given',
     "The field description and title is missing"
 );
-$collections = GetCollections;
+$collections = GetCollections();
 is( scalar(@$collections), $countcollection + 2, "No collection added" );
 
 #FIXME, as the id is auto incremented, two similar Collections (same title /same description) can be created
 #$collection1 = CreateCollection('Collection1','Description1');
 
 #Test GetCollections
-$collection = GetCollections;
+$collection = GetCollections();
 is_deeply(
     $collections,
     [
@@ -297,7 +296,7 @@ is(
     'No Collection Id Given',
     "DeleteCollection without id"
 );
-$collections = GetCollections;
+$collections = GetCollections();
 is(
     scalar(@$collections),
     $countcollection + 0,