Skip to content

Commit

Permalink
New test for custom tags
Browse files Browse the repository at this point in the history
  • Loading branch information
essenciary committed Feb 28, 2024
1 parent 2e847ed commit facf8d4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/tests_advanced_html_rendering.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,23 @@
@test String(r.body) |> fws ==
"<!DOCTYPE html><html><body><ol><li>a = 200</li><li>b = 200</li><li>c = 200</li></ol></body></html>" |> fws
end;

@safetestset "non registered tags are rendered" begin
using Genie
using Genie.Renderer.Html
import Genie.Util: fws

view = raw"""
<div>
<custom-tag>
<p>hello $name</p>
</custom-tag>
</div>
"""

r = html(view, name = "Adrian")

@test String(r.body) |> fws ==
"<!DOCTYPE html><html><body><div><custom-tag><p>hello Adrian</p></custom-tag></div></body></html>" |> fws
end;
end;

0 comments on commit facf8d4

Please sign in to comment.