improve Containers.list_tags

This commit is contained in:
2023-06-03 19:53:44 -04:00
parent 79c97d7502
commit 7c42dd8a3a
3 changed files with 36 additions and 29 deletions

View File

@ -168,10 +168,10 @@ defmodule Cannery.ContainersTest do
tag_fixture(%{name: "bullet", desc: "pews brass shell"}, user_fixture())
# name
assert Containers.list_tags("bullet", current_user) == [tag_a]
assert Containers.list_tags("bullets", current_user) == [tag_a]
assert Containers.list_tags("hollow", current_user) == [tag_b]
assert Containers.list_tags("hollows", current_user) == [tag_b]
assert Containers.list_tags(current_user, search: "bullet") == [tag_a]
assert Containers.list_tags(current_user, search: "bullets") == [tag_a]
assert Containers.list_tags(current_user, search: "hollow") == [tag_b]
assert Containers.list_tags(current_user, search: "hollows") == [tag_b]
end
test "get_tag!/2 returns the tag with given id", %{tag: tag, current_user: current_user} do