Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo0807 committed Nov 23, 2023
1 parent f9d697c commit bfbbed0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/ex_tabler_icons_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@ defmodule TablerIconsTest do

test "icon" do
assert render_component(&TablerIcons.user/1, %{}) ==
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|

assert render_component(&TablerIcons.user/1, %{class: "w-2 h-2"}) ==
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\" class=\"w-2 h-2\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" class=\"w-2 h-2\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|

assert render_component(&TablerIcons.user/1, %{"stroke-width": "1"}) ==
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1\" viewBox=\"0 0 24 24\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"1\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
end

test "dynamic icon" do
assert render_component(&TablerIcons.icon/1, %{name: :user}) ==
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|

assert render_component(&TablerIcons.icon/1, %{name: :user, class: "w-2 h-2"}) ==
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" viewBox=\"0 0 24 24\" class=\"w-2 h-2\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" class=\"w-2 h-2\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|

assert render_component(&TablerIcons.icon/1, %{name: :user, "stroke-width": "1"}) ==
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" fill=\"none\" height=\"24\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1\" viewBox=\"0 0 24 24\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
~s|<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"1\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"></path>\n <path d=\"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0\"></path>\n <path d=\"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2\"></path>\n</svg>|
end

test "generated docs" do
Expand Down

0 comments on commit bfbbed0

Please sign in to comment.