Bugzilla – Attachment 93590 Details for
Bug 20589
Add field boosting and use elastic query fields parameter instead of deprecated _all
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20589: (RM follow-up) Fix Koha::SearchField.t
Bug-20589-RM-follow-up-Fix-KohaSearchFieldt.patch (text/plain), 2.38 KB, created by
Martin Renvoize (ashimema)
on 2019-10-03 13:03:47 UTC
(
hide
)
Description:
Bug 20589: (RM follow-up) Fix Koha::SearchField.t
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-03 13:03:47 UTC
Size:
2.38 KB
patch
obsolete
>From 1e5fee9044fff5a6b08c5600ded90705de4a9f72 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 3 Oct 2019 14:02:27 +0100 >Subject: [PATCH] Bug 20589: (RM follow-up) Fix Koha::SearchField.t > >This patch removes the unit test for the weighted_fields method which >this bug removed. >--- > t/db_dependent/Koha/SearchField.t | 66 +------------------------------ > 1 file changed, 1 insertion(+), 65 deletions(-) > >diff --git a/t/db_dependent/Koha/SearchField.t b/t/db_dependent/Koha/SearchField.t >index af8f35d4cb..6f426fd1b9 100644 >--- a/t/db_dependent/Koha/SearchField.t >+++ b/t/db_dependent/Koha/SearchField.t >@@ -19,7 +19,7 @@ > > use Modern::Perl; > >-use Test::More tests => 15; >+use Test::More tests => 8; > > use Koha::Database; > use Koha::SearchFields; >@@ -135,68 +135,4 @@ ok(!$search_field->is_mapped_biblios, 'Search field is not mapped'); > > Koha::SearchFields->search({})->delete; > >-$builder->build({ >- source => 'SearchField', >- value => { >- name => 'acqdate', >- label => 'acqdate', >- weight => undef >- } >-}); >- >-$builder->build({ >- source => 'SearchField', >- value => { >- name => 'copydate', >- label => 'copydate', >- weight => undef >- } >-}); >- >-$builder->build({ >- source => 'SearchField', >- value => { >- name => 'ccode', >- label => 'ccode', >- weight => 0 >- } >-}); >- >-$builder->build({ >- source => 'SearchField', >- value => { >- name => 'title', >- label => 'title', >- weight => 25 >- } >-}); >- >-$builder->build({ >- source => 'SearchField', >- value => { >- name => 'subject', >- label => 'subject', >- weight => 15 >- } >-}); >- >-$builder->build({ >- source => 'SearchField', >- value => { >- name => 'author', >- label => 'author', >- weight => 5 >- } >-}); >- >-my @w_fields = Koha::SearchFields->weighted_fields(); >-is(scalar(@w_fields), 3, 'weighted_fields should return 3 weighted fields.'); >- >-is($w_fields[0]->name, 'title', 'First field is title.'); >-is($w_fields[0]->weight+0, 25, 'Title weight is 25.'); >-is($w_fields[1]->name, 'subject', 'Second field is subject.'); >-is($w_fields[1]->weight+0, 15, 'Subject weight is 15.'); >-is($w_fields[2]->name, 'author', 'Third field is author.'); >-is($w_fields[2]->weight+0, 5, 'Author weight is 5.'); >- > $schema->storage->txn_rollback; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20589
:
74245
|
74249
|
74301
|
74373
|
74418
|
74419
|
82503
|
82544
|
83016
|
83019
|
87358
|
87411
|
87412
|
87415
|
87416
|
92454
|
92455
|
92456
|
92457
|
93238
|
93239
|
93240
|
93241
|
93247
|
93248
|
93249
|
93250
|
93251
|
93348
|
93349
|
93350
|
93351
|
93352
|
93353
|
93379
|
93380
|
93381
|
93382
|
93383
|
93384
| 93590 |
93624