Bug 11402: (follow-up) add one more unit test
authorGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 16:22:05 +0000 (16:22 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 30 Dec 2013 16:23:10 +0000 (16:23 +0000)
This test exercise the case where defined parameters
are passed to the _guide_box() routine.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
t/Labels.t

index 0b2b804..f762a73 100644 (file)
@@ -20,7 +20,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 10;
+use Test::More tests => 11;
 
 BEGIN {
     use_ok('C4::Labels::Label');
@@ -47,6 +47,18 @@ ok(!defined C4::Labels::Label::_guide_box($llx,$lly,undef,$height),
         "Test guide box with undefined 'width' returns undef");
 ok(!defined C4::Labels::Label::_guide_box($llx,$lly,$width,undef),
         "Test guide box with undefined 'height' returns undef");
+is(
+    C4::Labels::Label::_guide_box($llx, $lly, $width, $height),
+    'q
+0.5 w
+1.0 0.0 0.0  RG
+1.0 1.0 1.0  rg
+0 0 10 10 re
+B
+Q
+',
+    'Return guide box if all four parameters are defined'
+);
 
 ok(C4::Labels::Label::_get_text_fields(), 'test getting textx fields');