Skip to content

Commit

Permalink
refactor test helper for live struct update tests - use Hui.U struct …
Browse files Browse the repository at this point in the history
…internally to issue commit command (vs. binary)
  • Loading branch information
boonious committed Oct 6, 2018
1 parent c991308 commit dc163d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ defmodule TestHelpers do

# for live update tests
def delete_verify_doc_deletion(%Hui.URL{} = url, delete_msg, id) when is_binary(delete_msg) do
# change the following update calls from binary to struct-based later when 'delete', 'commit' ops exist
Hui.Request.update(url, delete_msg)
Hui.Request.update(url, "{\"commit\":{}}")
Hui.Request.update(url, %Hui.U{commit: true})
ids = if is_list(id), do: Enum.join(id, " OR "), else: id
resp = Hui.search!(:default, q: "*", fq: ["id:#{ids}"])
assert resp.body["response"]["numFound"] == 0
Expand Down

0 comments on commit dc163d9

Please sign in to comment.