Skip to content

Commit

Permalink
feat: Adding test for tag. #256
Browse files Browse the repository at this point in the history
  • Loading branch information
LuchoTurtle committed Jan 24, 2023
1 parent bd1a111 commit 310fced
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/app/tag_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,16 @@ defmodule App.TagTest do
assert {:ok, _etc} = Tag.delete_tag(tag)
end
end

describe "List tags" do
@valid_attrs %{text: "tag1", person_id: 1, color: "#FCA5A5"}

test "list_person_tags_text/0 returns the tags texts" do
{:ok, tag} = Tag.create_tag(@valid_attrs)
tags_text_array = Tag.list_person_tags_text(@valid_attrs.person_id)
assert length(tags_text_array) == 1
assert Enum.at(tags_text_array, 0) == @valid_attrs.text
end
end

end

0 comments on commit 310fced

Please sign in to comment.