File tree 2 files changed +10
-1
lines changed
elasticsearch-persistence
lib/elasticsearch/persistence
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,9 @@ def settings(*args)
211
211
#
212
212
# @since 6.0.0
213
213
def index_exists? ( *args )
214
- super ( index_name : index_name )
214
+ params = { index_name : index_name }
215
+ params . merge! ( args . first ) unless args . empty?
216
+ super ( params )
215
217
end
216
218
217
219
# Get the nicer formatted string for use in inspection.
Original file line number Diff line number Diff line change @@ -353,6 +353,13 @@ class RepositoryWithDSL
353
353
it 'determines if the index exists' do
354
354
expect ( repository . index_exists? ) . to be ( true )
355
355
end
356
+
357
+ context 'when arguments are passed in' do
358
+
359
+ it 'passes the arguments to the request' do
360
+ expect ( repository . index_exists? ( index : 'other' ) ) . to be ( false )
361
+ end
362
+ end
356
363
end
357
364
358
365
context 'when the method is called on the class' do
You can’t perform that action at this time.
0 commit comments