Lines 193-202
my @w_fields = Koha::SearchFields->weighted_fields();
Link Here
|
193 |
is(scalar(@w_fields), 3, 'weighted_fields should return 3 weighted fields.'); |
193 |
is(scalar(@w_fields), 3, 'weighted_fields should return 3 weighted fields.'); |
194 |
|
194 |
|
195 |
is($w_fields[0]->name, 'title', 'First field is title.'); |
195 |
is($w_fields[0]->name, 'title', 'First field is title.'); |
196 |
is($w_fields[0]->weight, 25, 'Title weight is 25.'); |
196 |
is($w_fields[0]->weight+0, 25, 'Title weight is 25.'); |
197 |
is($w_fields[1]->name, 'subject', 'Second field is subject.'); |
197 |
is($w_fields[1]->name, 'subject', 'Second field is subject.'); |
198 |
is($w_fields[1]->weight, 15, 'Subject weight is 15.'); |
198 |
is($w_fields[1]->weight+0, 15, 'Subject weight is 15.'); |
199 |
is($w_fields[2]->name, 'author', 'Third field is author.'); |
199 |
is($w_fields[2]->name, 'author', 'Third field is author.'); |
200 |
is($w_fields[2]->weight, 5, 'Author weight is 5.'); |
200 |
is($w_fields[2]->weight+0, 5, 'Author weight is 5.'); |
201 |
|
201 |
|
202 |
$schema->storage->txn_rollback; |
202 |
$schema->storage->txn_rollback; |
203 |
- |
|
|