Bug 21962: Unit tests
authorNick Clemens <nick@bywatersolutions.com>
Thu, 6 Dec 2018 12:41:41 +0000 (12:41 +0000)
committerJesse Maseto <jesse@bywatersolution.com>
Tue, 18 Dec 2018 19:19:39 +0000 (19:19 +0000)
Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39c93e87f648978ec7907220710efaf64e556ea0)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d6b7e00b9cd04e15c472b2f7b075d85886ffa3e5)

t/db_dependent/Search.t

index a0fdc47..da5958f 100644 (file)
@@ -786,6 +786,16 @@ if ( $indexing_mode eq 'dom' ) {
         );
         is($count, 1, 'MARC21 authorities: one hit on LC-card-number contains "99282477"');
     }
+    ($auths, $count) = SearchAuthorities(
+        ['LC-card-number'], ['and'], [''], ['contains'],
+        ['99282477'], 0, 10, '', '', 1
+    );
+    is($count, 1, 'MARC21 authorities: one hit on LC-card-number contains "99282477"');
+    ($auths, $count) = SearchAuthorities(
+        ['all'], ['and'], [''], ['contains'],
+        ['professional wrestler'], 0, 10, '', '', 1
+    );
+    is($count, 1, 'MARC21 authorities: one hit on "all" (entire record) contains "professional wrestler"');
 
     $UseQueryParser = 1;
 
@@ -994,6 +1004,8 @@ subtest 'MARC21 + DOM' => sub {
 subtest 'UNIMARC + GRS-1' => sub {
     plan tests => 14;
     run_unimarc_search_tests('grs1');
+    plan tests => 112;
+    run_marc21_search_tests();
 };
 
 subtest 'UNIMARC + DOM' => sub {