summaryrefslogtreecommitdiffstats
path: root/tpl/collections/index_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-06-06 09:48:40 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-06-07 13:02:58 +0200
commit0566bbf7c7f2898fcd1d6156b27733cd48aa0449 (patch)
tree69ee0bde4d334cb0565afd5fb4e17247c946aad9 /tpl/collections/index_test.go
parent534e7155bb504682a37f5663d8c913e439b11e07 (diff)
Fix raw TOML dates in where/eq
Note that this has only been a problem with "raw dates" in TOML files in /data and similar. The predefined front matter dates `.Date` etc. are converted to a Go Time and has worked fine even after upgrading to v2 of the go-toml lib. Fixes #9979
Diffstat (limited to 'tpl/collections/index_test.go')
-rw-r--r--tpl/collections/index_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/tpl/collections/index_test.go b/tpl/collections/index_test.go
index b9d5127ee..662fe6f33 100644
--- a/tpl/collections/index_test.go
+++ b/tpl/collections/index_test.go
@@ -18,6 +18,8 @@ import (
"testing"
"github.com/gohugoio/hugo/common/maps"
+ "github.com/gohugoio/hugo/config"
+ "github.com/gohugoio/hugo/langs"
qt "github.com/frankban/quicktest"
"github.com/gohugoio/hugo/deps"
@@ -26,7 +28,7 @@ import (
func TestIndex(t *testing.T) {
t.Parallel()
c := qt.New(t)
- ns := New(&deps.Deps{})
+ ns := New(&deps.Deps{Language: langs.NewDefaultLanguage(config.New())})
for i, test := range []struct {
item any