@@ -164,6 +164,7 @@ def as_indexed_json(options={})
164
164
instance . expects ( :instance_variable_set ) . with do |name , value |
165
165
assert_equal :@__changed_attributes , name
166
166
assert_equal ( { foo : 'Two' } , value )
167
+ true
167
168
end
168
169
169
170
::DummyIndexingModelWithCallbacks . __send__ :include , Elasticsearch ::Model ::Indexing ::InstanceMethods
@@ -182,6 +183,7 @@ def as_indexed_json(options={})
182
183
assert_equal 'bar' , payload [ :type ]
183
184
assert_equal '1' , payload [ :id ]
184
185
assert_equal 'JSON' , payload [ :body ]
186
+ true
185
187
end
186
188
187
189
instance . expects ( :client ) . returns ( client )
@@ -199,6 +201,7 @@ def as_indexed_json(options={})
199
201
200
202
client . expects ( :index ) . with do |payload |
201
203
assert_equal 'A' , payload [ :parent ]
204
+ true
202
205
end
203
206
204
207
instance . expects ( :client ) . returns ( client )
@@ -218,6 +221,7 @@ def as_indexed_json(options={})
218
221
assert_equal 'foo' , payload [ :index ]
219
222
assert_equal 'bar' , payload [ :type ]
220
223
assert_equal '1' , payload [ :id ]
224
+ true
221
225
end
222
226
223
227
instance . expects ( :client ) . returns ( client )
@@ -234,6 +238,7 @@ def as_indexed_json(options={})
234
238
235
239
client . expects ( :delete ) . with do |payload |
236
240
assert_equal 'A' , payload [ :parent ]
241
+ true
237
242
end
238
243
239
244
instance . expects ( :client ) . returns ( client )
@@ -267,6 +272,7 @@ def as_indexed_json(options={})
267
272
assert_equal 'bar' , payload [ :type ]
268
273
assert_equal '1' , payload [ :id ]
269
274
assert_equal ( { foo : 'bar' } , payload [ :body ] [ :doc ] )
275
+ true
270
276
end
271
277
272
278
instance . expects ( :client ) . returns ( client )
@@ -286,6 +292,7 @@ def as_indexed_json(options={})
286
292
287
293
client . expects ( :update ) . with do |payload |
288
294
assert_equal ( { :foo => 'B' } , payload [ :body ] [ :doc ] )
295
+ true
289
296
end
290
297
291
298
instance . expects ( :client ) . returns ( client )
@@ -306,6 +313,7 @@ def as_indexed_json(options={})
306
313
307
314
client . expects ( :update ) . with do |payload |
308
315
assert_equal ( { 'foo' => 'BAR' } , payload [ :body ] [ :doc ] )
316
+ true
309
317
end
310
318
311
319
instance . expects ( :client ) . returns ( client )
@@ -356,6 +364,7 @@ class ::DummyIndexingModelForRecreate
356
364
assert_equal 'dummy_indexing_model_for_recreates' , payload [ :index ]
357
365
assert_equal 1 , payload [ :body ] [ :settings ] [ :index ] [ :number_of_shards ]
358
366
assert_equal 'keyword' , payload [ :body ] [ :mappings ] [ :dummy_indexing_model_for_recreate ] [ :properties ] [ :foo ] [ :analyzer ]
367
+ true
359
368
end . returns ( { } )
360
369
361
370
DummyIndexingModelForRecreate . expects ( :client ) . returns ( client ) . at_least_once
@@ -434,10 +443,12 @@ class ::DummyIndexingModelForRecreate
434
443
should "create the custom index" do
435
444
@indices . expects ( :exists ) . with do |arguments |
436
445
assert_equal 'custom-foo' , arguments [ :index ]
446
+ true
437
447
end
438
448
439
449
@indices . expects ( :create ) . with do |arguments |
440
450
assert_equal 'custom-foo' , arguments [ :index ]
451
+ true
441
452
end
442
453
443
454
DummyIndexingModelForRecreate . create_index! index : 'custom-foo'
@@ -446,6 +457,7 @@ class ::DummyIndexingModelForRecreate
446
457
should "delete the custom index" do
447
458
@indices . expects ( :delete ) . with do |arguments |
448
459
assert_equal 'custom-foo' , arguments [ :index ]
460
+ true
449
461
end
450
462
451
463
DummyIndexingModelForRecreate . delete_index! index : 'custom-foo'
@@ -454,6 +466,7 @@ class ::DummyIndexingModelForRecreate
454
466
should "refresh the custom index" do
455
467
@indices . expects ( :refresh ) . with do |arguments |
456
468
assert_equal 'custom-foo' , arguments [ :index ]
469
+ true
457
470
end
458
471
459
472
DummyIndexingModelForRecreate . refresh_index! index : 'custom-foo'
0 commit comments