summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJitendra Rajpurohit <rajpurohitjitendra83@gmail.com>2020-04-13 02:40:32 +0530
committerGitHub <noreply@github.com>2020-04-12 17:10:32 -0400
commitc066135a4bd6c75cd19fe342f768d2213df9e684 (patch)
tree2e373e546e5fceb43fe7bfff4522a67a1832519b
parent2fe396e3ce4818c951485336ed95187562221bfd (diff)
downloadhashie-c066135a4bd6c75cd19fe342f768d2213df9e684.tar.gz
Elasticsearch integration spec fix (#520)
-rw-r--r--spec/integration/elasticsearch/integration_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/integration/elasticsearch/integration_spec.rb b/spec/integration/elasticsearch/integration_spec.rb
index c3817fe..7ce73ed 100644
--- a/spec/integration/elasticsearch/integration_spec.rb
+++ b/spec/integration/elasticsearch/integration_spec.rb
@@ -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