Skip to content

Commit 33783ab

Browse files
committed
fix tests for different header ordering in nightlies
1 parent 3ee0a07 commit 33783ab

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/renderers/Html.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,6 @@ function parsehtml(elem::HTMLParser.Node; partial::Bool = true, indent = 0) :: S
824824

825825
if (elem.type == HTMLParser.ELEMENT_NODE)
826826
attrs_dict = LittleDict{String,Any}()
827-
@show attrs_dict
828827
for a in HTMLParser.attributes(elem)
829828
try
830829
attrs_dict[a.name] = elem[a.name]

test/tests_files_vars_rendering.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"<!DOCTYPE html><html><body><h1>$greeting</h1><div><p>This is a $name test</p></div>
7777
<hr$(Genie.config.html_parser_close_tag)></body></html>" |> fws
7878

79-
@test r.headers[1]["Cache-Control"] == "no-cache"
79+
@test Dict(r.headers)["Cache-Control"] == "no-cache"
8080
end;
8181

8282
@testset "HTML rendering with view file and layout with vars custom headers" begin
@@ -87,7 +87,7 @@
8787
<h1>$greeting</h1><div><p>This is a $name test</p></div><hr$(Genie.config.html_parser_close_tag)></div>
8888
<footer>Just a footer</footer></body></html>" |> fws
8989

90-
@test r.headers[1]["Cache-Control"] == "no-cache"
90+
@test Dict(r.headers)["Cache-Control"] == "no-cache"
9191
end;
9292

9393
@testset "HTML rendering with view file no layout with vars custom headers custom status" begin
@@ -97,7 +97,7 @@
9797
"<!DOCTYPE html><html><body><h1>$greeting</h1><div><p>This is a $name test</p></div>
9898
<hr$(Genie.config.html_parser_close_tag)></body></html>" |> fws
9999

100-
@test r.headers[1]["Cache-Control"] == "no-cache"
100+
@test Dict(r.headers)["Cache-Control"] == "no-cache"
101101

102102
@test r.status == 500
103103
end;
@@ -111,7 +111,7 @@
111111
<h1>$greeting</h1><div><p>This is a $name test</p></div><hr$(Genie.config.html_parser_close_tag)></div>
112112
<footer>Just a footer</footer></body></html>" |> fws
113113

114-
@test r.headers[1]["Cache-Control"] == "no-cache"
114+
@test Dict(r.headers)["Cache-Control"] == "no-cache"
115115

116116
@test r.status == 404
117117
end;

0 commit comments

Comments
 (0)