diff options
author | Bjørn Erik Pedersen <[email protected]> | 2017-08-16 09:59:42 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2017-08-16 09:59:42 +0200 |
commit | f0f49ed9b0c9b4545a45c95d56340fcbf4aafbef (patch) | |
tree | 47de7a4cc4279f99b71e6688fe0445430b11c635 /hugolib/site_sections_test.go | |
parent | 71ae9b4533083be185c5314c9c5b273cc3bd07bd (diff) | |
download | hugo-f0f49ed9b0c9b4545a45c95d56340fcbf4aafbef.tar.gz hugo-f0f49ed9b0c9b4545a45c95d56340fcbf4aafbef.zip |
hugolib: Add Page.Equals
Diffstat (limited to 'hugolib/site_sections_test.go')
-rw-r--r-- | hugolib/site_sections_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hugolib/site_sections_test.go b/hugolib/site_sections_test.go index 441391197..950900140 100644 --- a/hugolib/site_sections_test.go +++ b/hugolib/site_sections_test.go @@ -149,6 +149,16 @@ PAG|{{ .Title }}|{{ $sect.InSection . }} d := p.s.getPage(KindSection, "empty2", "b", "c", "d") assert.NotNil(d) assert.Equal("T41_-1", d.Title) + + equals, err := c.Equals(d) + assert.NoError(err) + assert.False(equals) + equals, err = c.Equals(c) + assert.NoError(err) + assert.True(equals) + _, err = c.Equals("asdf") + assert.Error(err) + }}, {"empty3", func(p *Page) { // b,c,d with regular page in b |