|
Lines 19-25
Link Here
|
| 19 |
|
19 |
|
| 20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
| 21 |
|
21 |
|
| 22 |
use Test::More tests => 3; |
22 |
use Test::More tests => 4; |
| 23 |
use Test::MockModule; |
23 |
use Test::MockModule; |
| 24 |
use Test::Warn; |
24 |
use Test::Warn; |
| 25 |
use t::lib::Mocks; |
25 |
use t::lib::Mocks; |
|
Lines 120-125
subtest 'index_records() tests' => sub {
Link Here
|
| 120 |
} |
120 |
} |
| 121 |
"Update background " . $biblio->biblionumber, |
121 |
"Update background " . $biblio->biblionumber, |
| 122 |
"When passing id only to index_records the marc record is fetched and passed through to update_index"; |
122 |
"When passing id only to index_records the marc record is fetched and passed through to update_index"; |
|
|
123 |
|
| 124 |
}; |
| 125 |
|
| 126 |
subtest 'update_index' => sub { |
| 127 |
plan tests => 1; |
| 128 |
|
| 129 |
my $biblio = $builder->build_sample_biblio; |
| 130 |
my $biblionumber = $biblio->biblionumber; |
| 131 |
$biblio->delete; |
| 132 |
|
| 133 |
my $indexer = Koha::SearchEngine::Elasticsearch::Indexer->new({ 'index' => 'biblios' }); |
| 134 |
warning_is { |
| 135 |
$indexer->update_index([$biblionumber]); |
| 136 |
|
| 137 |
} "", "update_index called with deleted biblionumber should not crash"; |
| 138 |
|
| 123 |
}; |
139 |
}; |
| 124 |
|
140 |
|
| 125 |
} |
141 |
} |
| 126 |
- |
|
|