Skip to content

Commit

Permalink
fix pattern match on test
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeyson committed Jul 8, 2024
1 parent b13231a commit 0d2e892
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/document_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ defmodule DocumentTest do
person = %Person{id: 99, name: "John Smith", persons_id: 99, country: "Brazil"}

assert {:ok,
%{"country" => "Brazil", "id" => "1", "name" => "John Smith", "persons_id" => 99}} =
%{"country" => "Brazil", "id" => _, "name" => "John Smith", "persons_id" => 99}} =
ExTypesense.create_document(person)

assert {:ok, _} = ExTypesense.delete_document(person)
Expand Down Expand Up @@ -191,7 +191,7 @@ defmodule DocumentTest do
test "success: delete all documents using Ecto schema module" do
person = %Person{id: 1, name: "John Doe", persons_id: 1, country: "Scotland"}

assert {:ok, %{"country" => "Scotland", "id" => "0", "name" => "John Doe", "persons_id" => 1}} =
assert {:ok, %{"country" => "Scotland", "id" => _, "name" => "John Doe", "persons_id" => 1}} =
ExTypesense.create_document(person)

assert {:ok, %{"num_deleted" => 1}} == ExTypesense.delete_all_documents(Person)
Expand Down Expand Up @@ -222,4 +222,8 @@ defmodule DocumentTest do

assert documents_deleted > 0
end

test "success: delete documents by query" do

Check failure on line 226 in test/document_test.exs

View workflow job for this annotation

GitHub Actions / test (0.25.2, 8108:8108)

test success: delete documents by query (DocumentTest)

Check failure on line 226 in test/document_test.exs

View workflow job for this annotation

GitHub Actions / test (26.0, 8108:8108)

test success: delete documents by query (DocumentTest)
assert nil === true
end
end

0 comments on commit 0d2e892

Please sign in to comment.