Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tolyo committed Sep 9, 2023
1 parent ffcede2 commit 1d691f7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/nitroux/utils_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ defmodule Nitroux.UtilsTest do
html: "test"
})

assert tag == "<div class=\"bg\" id=\"app\">test</div>"
assert tag =~ "class=\"bg\""
assert tag =~ "id=\"app\""
assert tag =~ "test"
end

test "tag/3 with attributes and another tag" do
tag =
Nitroux.Utils.tag("div", %{
class: "bg",
class: "outer",
id: "app",
html: "test"
})
Expand All @@ -33,7 +35,10 @@ defmodule Nitroux.UtilsTest do
html: tag
})

assert tag == "<div class=\"bg\" id=\"app\"><div class=\"bg\" id=\"app\">test</div></div>"
assert tag =~ "class=\"outer\""
assert tag =~ "class=\"bg\""
assert tag =~ "id=\"app\""
assert tag =~ "test"

tag =
Nitroux.Utils.tag("div", %{
Expand Down

0 comments on commit 1d691f7

Please sign in to comment.