bug 8252: (follow-up) add search tests on music number
authorGalen Charlton <gmc@esilibrary.com>
Thu, 10 Oct 2013 17:28:51 +0000 (17:28 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Thu, 10 Oct 2013 17:28:51 +0000 (17:28 +0000)
There was some churn in previous patches about the desired
name of the music publisher number index, so this patch
adds tests to confirm that both the old and new names
work as CCL keywords.

To test:

[1] Verify that t/db_dependent/Search.t passes.

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

index 0ad129d..f51347f 100644 (file)
@@ -12,7 +12,7 @@ use YAML;
 use C4::Debug;
 require C4::Context;
 
-use Test::More tests => 158;
+use Test::More tests => 162;
 use Test::MockModule;
 use MARC::Record;
 use File::Spec;
@@ -276,6 +276,11 @@ sub run_search_tests {
     ( $error, $marcresults, $total_hits ) = SimpleSearch("kw=book", 0, 10);
     is($total_hits, 101, "SimpleSearch handles simple CCL");
 
+    ( $error, $marcresults, $total_hits ) = SimpleSearch("Music-number=49631-2", 0, 10);
+    is($total_hits, 1, "SimpleSearch on music publisher number works (bug 8252)");
+    ( $error, $marcresults, $total_hits ) = SimpleSearch("Identifier-publisher-for-music=49631-2", 0, 10);
+    is($total_hits, 1, "SimpleSearch on music publisher number works using Identifier-publisher-for-music (bug 8252)");
+
     # Testing getRecords
 
     my $results_hashref;