mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
18 lines
426 B
Go
18 lines
426 B
Go
package hugolib
|
|
|
|
import (
|
|
"testing"
|
|
"strings"
|
|
)
|
|
|
|
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)
|
|
}
|
|
}
|
|
|
|
|