Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/taxonomy_test.go')
-rw-r--r--hugolib/taxonomy_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/hugolib/taxonomy_test.go b/hugolib/taxonomy_test.go
index 65b36d4e5..5cbd58d10 100644
--- a/hugolib/taxonomy_test.go
+++ b/hugolib/taxonomy_test.go
@@ -18,6 +18,9 @@ import (
"reflect"
"testing"
+ "github.com/spf13/hugo/deps"
+ "github.com/spf13/hugo/hugofs"
+
"github.com/spf13/viper"
)
@@ -31,16 +34,14 @@ func TestByCountOrderOfTaxonomies(t *testing.T) {
viper.Set("taxonomies", taxonomies)
- writeSource(t, filepath.Join("content", "page.md"), pageYamlWithTaxonomiesA)
+ fs := hugofs.NewMem()
- site := NewSiteDefaultLang()
+ writeSource(t, fs, filepath.Join("content", "page.md"), pageYamlWithTaxonomiesA)
- if err := buildSiteSkipRender(site); err != nil {
- t.Fatalf("Failed to build site: %s", err)
- }
+ s := buildSingleSite(t, deps.DepsCfg{Fs: fs}, BuildCfg{})
st := make([]string, 0)
- for _, t := range site.Taxonomies["tags"].ByCount() {
+ for _, t := range s.Taxonomies["tags"].ByCount() {
st = append(st, t.Name)
}