Skip to content

Commit d7945b4

Browse files
committed
[STORE] Updated the "update by script" integration test for Elasticsearch 5
See: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html#_scripted_updates
1 parent c3f3601 commit d7945b4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

elasticsearch-persistence/test/integration/repository/virtus_model_test.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ def deserialize(document)
102102
should "update the object with a script and params" do
103103
response = @repository.save Page.new(title: 'Test Page')
104104

105-
@repository.update id: response['_id'], script: 'ctx._source.views += count', params: { count: 3 }
105+
@repository.update id: response['_id'],
106+
script: {
107+
inline: 'ctx._source.views += params.count',
108+
params: { count: 3 }
109+
}
106110

107111
page = @repository.find(response['_id'])
108112
assert_equal 3, page.views

0 commit comments

Comments
 (0)