Bug 12288: add regression test
authorGalen Charlton <gmc@esilibrary.com>
Mon, 19 May 2014 19:29:44 +0000 (19:29 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 19 May 2014 19:59:40 +0000 (19:59 +0000)
To test:

[1] Run prove -v t/Koha.t.  The last test should fail.
[2] Apply the main patch for this bug.
[3] Run prove -v t/Koha.t again.  This time, all tests should pass.

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

index 1f1e4db..31365e6 100755 (executable)
--- a/t/Koha.t
+++ b/t/Koha.t
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 
 use C4::Context;
-use Test::More tests => 15;
+use Test::More tests => 16;
 use Test::MockModule;
 use DBD::Mock;
 
@@ -73,3 +73,6 @@ eval {
     $isbn = C4::Koha::NormalizeISBN({ isbn => '0788893777 (2 DVD 45th ed)', format => 'ISBN-10', strip_hyphens => 1 });
 };
 ok($@ eq '', 'NormalizeISBN does not throw exception when parsing invalid ISBN (bug 12243)');
+
+@isbns = GetVariationsOfISBNs('abc');
+is(scalar(@isbns), 0, 'zero variations returned of invalid ISBN');