Bug 21987: (RM follow-up) Add text for simple tests
authorNick Clemens <nick@bywatersolutions.com>
Fri, 15 Mar 2019 12:22:32 +0000 (12:22 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 19 Mar 2019 09:55:13 +0000 (09:55 +0000)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 1464328718619a673f233406fdb238f0391b0785)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

t/db_dependent/Images.t

index 9e2e509..a7063c8 100644 (file)
@@ -20,7 +20,7 @@ my $koha_logo = GD::Image->new($path);
     C4::Images::PutImage( $biblio->biblionumber, $koha_logo );
 
     my @imagenumbers = C4::Images::ListImagesForBiblio( $biblio->biblionumber );
-    is( scalar(@imagenumbers), 1 );
+    is( scalar(@imagenumbers), 1, "The image has been added to the biblio" );
     my $image = C4::Images::RetrieveImage($imagenumbers[0]);
     ok( length $image->{thumbnail} < length $image->{imagefile}, 'thumbnail should be shorter than the original image' );
 }
@@ -32,7 +32,7 @@ my $koha_logo = GD::Image->new($path);
     C4::Images::PutImage( $biblio->biblionumber, $koha_logo, 'replace' );
 
     my @imagenumbers = C4::Images::ListImagesForBiblio( $biblio->biblionumber );
-    is( scalar(@imagenumbers), 1 );
+    is( scalar(@imagenumbers), 1 , "The image replaced the previous image on the biblio" );
     my $image = C4::Images::RetrieveImage($imagenumbers[0]);
     ok( length $image->{thumbnail} > length $image->{imagefile}, 'thumbnail should be bigger than the original image.' );
     # Actually it should not be bigger, but we cheat with the trueColor flag