Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ def settings(*args)
#
# @since 6.0.0
def index_exists?(*args)
super(index_name: index_name)
params = { index_name: index_name }
params.merge!(args.first) unless args.empty?
super(params)
end

# Get the nicer formatted string for use in inspection.
Expand Down
7 changes: 7 additions & 0 deletions elasticsearch-persistence/spec/repository_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,13 @@ class RepositoryWithDSL
it 'determines if the index exists' do
expect(repository.index_exists?).to be(true)
end

context 'when arguments are passed in' do

it 'passes the arguments to the request' do
expect(repository.index_exists?(index: 'other')).to be(false)
end
end
end

context 'when the method is called on the class' do
Expand Down