mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-08 23:40:40 +02:00
Add fill HTTP Response info into .Data in resources.GetRemote
See #10604
This commit is contained in:
@@ -35,7 +35,7 @@ func TestGetResourceHead(t *testing.T) {
|
||||
{{ with .Err }}
|
||||
{{ errorf "Unable to get remote resource: %s" . }}
|
||||
{{ else }}
|
||||
Head Content: {{ .Content }}.
|
||||
Head Content: {{ .Content }}. Head Data: {{ .Data }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Unable to get remote resource: %s" $url }}
|
||||
@@ -51,6 +51,9 @@ func TestGetResourceHead(t *testing.T) {
|
||||
|
||||
b.Build()
|
||||
|
||||
b.AssertFileContent("public/index.html", "Head Content: .")
|
||||
b.AssertFileContent("public/index.html",
|
||||
"Head Content: .",
|
||||
"Head Data: map[ContentLength:18210 ContentType:image/png Status:200 OK StatusCode:200 TransferEncoding:[]]",
|
||||
)
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user