Bug 7593: Fix unit tests
authorJonathan Druart <jonathan.druart@biblibre.com>
Mon, 13 May 2013 12:00:44 +0000 (14:00 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 14 May 2013 17:46:02 +0000 (13:46 -0400)
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
t/db_dependent/Acquisition.t

index db43118..b339db3 100755 (executable)
@@ -10,7 +10,7 @@ use POSIX qw(strftime);
 
 use C4::Bookseller qw( GetBookSellerFromId );
 
-use Test::More tests => 42;
+use Test::More tests => 41;
 
 BEGIN {
     use_ok('C4::Acquisition');
@@ -43,7 +43,7 @@ SKIP: {
    my $testorder = @$orders[0];
    my $testbiblio = $testorder->{'biblionumber'};
    my @listorders = GetOrdersByBiblionumber($testbiblio);
-   isa_ok( ref @listorders, 'ARRAY','GetOrdersByBiblionumber : result is an array' );
+   ok( @listorders ,'GetOrdersByBiblionumber : result is defined' );
    ok( scalar (@listorders) >0,'GetOrdersByBiblionumber : result contains at least one element' );
    my @matched_biblios = grep {$_->{biblionumber} == $testbiblio} @listorders;
    ok ( @matched_biblios == @listorders, "all orders match");