mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
Some minify configuration adjustments
This commit is contained in:
@@ -41,23 +41,3 @@ func TestTransform(t *testing.T) {
|
||||
c.Assert(content, qt.Equals, "<h1>Hugo Rocks!</h1>")
|
||||
|
||||
}
|
||||
|
||||
func TestNoMinifier(t *testing.T) {
|
||||
c := qt.New(t)
|
||||
|
||||
spec, _ := htesting.NewTestResourceSpec()
|
||||
spec.Cfg.Set("minifiers.enableXML", false)
|
||||
client, _ := New(spec)
|
||||
|
||||
original := "<title> Hugo Rocks! </title>"
|
||||
r, err := htesting.NewResourceTransformerForSpec(spec, "hugo.xml", original)
|
||||
c.Assert(err, qt.IsNil)
|
||||
|
||||
transformed, err := client.Minify(r)
|
||||
c.Assert(err, qt.IsNil)
|
||||
|
||||
content, err := transformed.(resource.ContentProvider).Content()
|
||||
// error should be ignored because general users cannot control codes under `theme`s
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(content, qt.Equals, original)
|
||||
}
|
||||
|
Reference in New Issue
Block a user