diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-07-23 20:19:32 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-07-23 20:20:19 +0200 |
commit | 016dd4a69a765061bb3da8490d3cac6ec47a91eb (patch) | |
tree | a3d333695aea420aa5a2688484e343f5058200c2 /hugolib/site_sections_test.go | |
parent | c6b599a06d66b8e3c92343d25bb8043eb4f291f1 (diff) |
Add Page.FirstSection
It was added and then removed by accident some time ago. Let us add it again, as it is useful.
Diffstat (limited to 'hugolib/site_sections_test.go')
-rw-r--r-- | hugolib/site_sections_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hugolib/site_sections_test.go b/hugolib/site_sections_test.go index 603f2898c..bfec623e5 100644 --- a/hugolib/site_sections_test.go +++ b/hugolib/site_sections_test.go @@ -176,6 +176,7 @@ PAG|{{ .Title }}|{{ $sect.InSection . }} active, err := home.InSection(home) assert.NoError(err) assert.True(active) + assert.Equal(p, p.FirstSection()) }}, {"l1", func(p *Page) { assert.Equal("L1s", p.title) @@ -249,6 +250,7 @@ PAG|{{ .Title }}|{{ $sect.InSection . }} isAncestor, err = p.IsAncestor(l1) assert.NoError(err) assert.False(isAncestor) + assert.Equal(l1, p.FirstSection()) }}, {"perm a,link", func(p *Page) { |