transform: Add missing test case for NewEmptyTransforms
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 6 Feb 2016 17:17:48 +0000 (18:17 +0100)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 6 Feb 2016 17:17:48 +0000 (18:17 +0100)
transform/chain_test.go

index ae7ef2caaaf2d929778542ff19dd817967f44c6a..8ac3b6bc12c6954308c60140e2e52ae40d763855 100644 (file)
@@ -16,6 +16,7 @@ package transform
 import (
        "bytes"
        "github.com/spf13/hugo/helpers"
+       "github.com/stretchr/testify/assert"
        "path/filepath"
        "strings"
        "testing"
@@ -211,6 +212,11 @@ func TestXMLAbsURL(t *testing.T) {
        apply(t.Errorf, tr, xml_abs_url_tests)
 }
 
+func TestNewEmptyTransforms(t *testing.T) {
+       transforms := NewEmptyTransforms()
+       assert.Equal(t, 20, cap(transforms))
+}
+
 type errorf func(string, ...interface{})
 
 func applyWithPath(ef errorf, tr chain, tests []test, path string) {