https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33348

--- Comment #13 from Janusz Kaczmarek <[email protected]> ---
(In reply to David Nind from comment #12)
> 2. Authority finder plugin when editing a record and trying to find an
> authority term (for example for a 650 entry): does not display any results,
> so can't confirm that it works. May be affected by the CSRF changes - see
> step 6 of my testing notes.

I can confirm that there is a problem with displaying authorities search result
from within plugin--but it dos not seem to be related with the patch.  This
issue occurs on clean master.

> Test Summary Report
> -------------------
> t/Koha/SearchEngine/Elasticsearch/Search.t (Wstat: 256 Tests: 2 Failed: 1)
>   Failed test:  2
>   Non-zero exit status: 1
> Files=1, Tests=2,  1 wallclock secs ( 0.01 usr  0.01 sys +  0.85 cusr  0.12
> csys =  0.99 CPU)
> Result: FAIL


As to the test: Aleisha, there are two problems in the test script: 1) 'aba' is
placed on wrong position in the 008 field; 2) the MARC record should be
base64-encoded while simulating ES search result.  My correction proposal would
be:

@@ -20,6 +20,8 @@ use Modern::Perl;
 use Test::More tests => 2;
 use Test::MockModule;
 use t::lib::Mocks;
+use Encode qw( encode );
+use MIME::Base64 qw( encode_base64 );

 use_ok('Koha::SearchEngine::Elasticsearch::Search');

@@ -67,9 +69,10 @@ subtest 'search_auth_compat' => sub {
             );
             $marc_record->append_fields(
                 MARC::Field->new(
-                    '008', '100803t2009    aba|||||  ||| 00| 0     d'
+                    '008', '950121n||a| nnaban          |a aaa    |d'
                 ),
             );
+            my $marc_data = encode_base64(encode('UTF-8',
$marc_record->as_usmarc()));
             return {
                 hits => {
                     hits => [
@@ -77,7 +80,7 @@ subtest 'search_auth_compat' => sub {
                             '_id'     => 8675309,
                             '_source' => {
                                 'local-number' => ['Wrong001Number'],
-                                'marc_data'    => $marc_record,
+                                'marc_data'    => $marc_data,
                                 'marc_format'  => 'base64ISO2709',
                             },
                         }

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to