Elasticsearch integration spec fix (#520)

This commit is contained in:
Jitendra Rajpurohit 2020-04-13 02:40:32 +05:30 committed by GitHub
parent 2fe396e3ce
commit c066135a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -14,12 +14,16 @@ class MyModel < Hashie::Mash
index_name 'model'
document_type 'model'
def as_indexed_json(options = {})
{ body: '{}' }.merge(options)
end
end
RSpec.describe 'elaasticsearch-model' do
# See https://github.com/hashie/hashie/issues/354#issuecomment-363306114
# for the reason why this doesn't work as you would expect
it 'raises an error when the model does has an id' do
it 'raises an error when the model does not have an id' do
object = MyModel.new
stub_elasticsearch_client