1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00
gohugoio-hugo/hugolib/indexing_test.go
2013-08-17 23:52:16 -04:00

17 lines
424 B
Go

package hugolib
import (
"strings"
"testing"
)
func TestSitePossibleIndexes(t *testing.T) {
site := new(Site)
page, _ := ReadFrom(strings.NewReader(PAGE_YAML_WITH_INDEXES_A), "path/to/page")
site.Pages = append(site.Pages, page)
indexes := site.possibleIndexes()
if !compareStringSlice(indexes, []string{"tags", "categories"}) {
t.Fatalf("possible indexes do not match [tags categories]. Got: %s", indexes)
}
}