Skip to content

Commit

Permalink
Merge pull request #30 from podium/fix-document-update-test
Browse files Browse the repository at this point in the history
Fix broken document update test
  • Loading branch information
werbitzky authored Apr 4, 2017
2 parents c5d3f0c + e0c3af5 commit d114283
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion lib/elastix/document.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ defmodule Elastix.Document do
def update(elastic_url, index_name, type_name, id, data, query_params \\ []) do
elastic_url <> make_path(index_name, type_name, query_params, id, "_update")
|> HTTP.post(Poison.encode!(data))
|> process_response
end

@doc false
Expand Down
4 changes: 2 additions & 2 deletions test/elastix/document_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ defmodule Elastix.DocumentTest do
new_post_date = "2017-03-17T14:12:12"
patch = %{ doc: %{ post_date: new_post_date } }

response = Document.update @test_url, @test_index, "message", 1, patch
{:ok, response} = Document.update @test_url, @test_index, "message", 1, patch
assert response.status_code == 200

%{body: body, status_code: status_code} = Document.get @test_url, @test_index, "message", 1
{:ok, %{body: body, status_code: status_code}} = Document.get @test_url, @test_index, "message", 1

assert status_code == 200
assert body["_source"]["user"] == "örelbörel"
Expand Down

0 comments on commit d114283

Please sign in to comment.