Bug 12478 : Fixing the tests in t/Koha_ElasticSearch_Indexer.t
authorChris Cormack <chrisc@catalyst.net.z>
Wed, 13 Apr 2016 20:51:59 +0000 (20:51 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 26 Apr 2016 20:20:13 +0000 (20:20 +0000)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

t/Koha_ElasticSearch_Indexer.t

index 6de6a32..d04a81f 100644 (file)
@@ -25,7 +25,7 @@ use_ok('Koha::ElasticSearch::Indexer');
 
 my $indexer;
 ok(
-    my $indexer = Koha::ElasticSearch::Indexer->new(
+    $indexer = Koha::ElasticSearch::Indexer->new(
         {
             'nodes' => ['localhost:9200'],
             'index' => 'mydb'
@@ -43,9 +43,9 @@ $field = MARC::Field->new( '245', '', '', 'a' => 'Title' );
 $marc_record->append_fields($field);
 
 my $records = [$marc_record];
-ok( my $converted = $indexer->convert_marc_to_json($records),
+ok( my $converted = $indexer->_convert_marc_to_json($records),
     'Convert some records' );
 
 is( $converted->count, 1, 'One converted record' );
 
-ok( $indexer->update_index($records), 'Update Index' );
+ok( $indexer->update_index(undef,$records), 'Update Index' );