use taskUid to detect success
This commit is contained in:
parent
e179d2f72d
commit
7cfb2afeec
2 changed files with 4 additions and 4 deletions
|
@ -153,7 +153,7 @@ def add_to_index(activity) do
|
|||
)
|
||||
|
||||
with {:ok, res} <- result,
|
||||
true <- Map.has_key?(res, "indexUid") do
|
||||
true <- Map.has_key?(res, "taskUid") do
|
||||
# Do nothing
|
||||
else
|
||||
_ ->
|
||||
|
|
|
@ -47,7 +47,7 @@ test "indexes a local post on creation" do
|
|||
Jason.decode!(body)
|
||||
)
|
||||
|
||||
json(%{updateId: 1})
|
||||
json(%{taskUid: 1})
|
||||
end)
|
||||
|
||||
{:ok, activity} =
|
||||
|
@ -100,11 +100,11 @@ test "deletes posts from index when deleted locally" do
|
|||
Jason.decode!(body)
|
||||
)
|
||||
|
||||
json(%{updateId: 1})
|
||||
json(%{taskUid: 1})
|
||||
|
||||
%{method: :delete, url: "http://127.0.0.1:7700/indexes/objects/documents/" <> id} ->
|
||||
assert String.length(id) > 1
|
||||
json(%{updateId: 2})
|
||||
json(%{taskUid: 2})
|
||||
end)
|
||||
|
||||
{:ok, activity} =
|
||||
|
|
Loading…
Reference in a new issue