mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Re-export the methods used in page group tests
This commit is contained in:
parent
3950b1375c
commit
819271cb78
1 changed files with 7 additions and 7 deletions
|
@ -139,15 +139,15 @@ func TestGroupByCalledWithUnavailableKey(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (page *Page) dummyPageMethodWithArgForTest(s string) string {
|
func (page *Page) DummyPageMethodWithArgForTest(s string) string {
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
func (page *Page) dummyPageMethodReturnThreeValueForTest() (string, string, string) {
|
func (page *Page) DummyPageMethodReturnThreeValueForTest() (string, string, string) {
|
||||||
return "foo", "bar", "baz"
|
return "foo", "bar", "baz"
|
||||||
}
|
}
|
||||||
|
|
||||||
func (page *Page) dummyPageMethodReturnErrorOnlyForTest() error {
|
func (page *Page) DummyPageMethodReturnErrorOnlyForTest() error {
|
||||||
return errors.New("something error occured")
|
return errors.New("something error occured")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,22 +159,22 @@ func TestGroupByCalledWithInvalidMethod(t *testing.T) {
|
||||||
var err error
|
var err error
|
||||||
pages := preparePageGroupTestPages(t)
|
pages := preparePageGroupTestPages(t)
|
||||||
|
|
||||||
_, err = pages.GroupBy("dummyPageMethodWithArgForTest")
|
_, err = pages.GroupBy("DummyPageMethodWithArgForTest")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("GroupByParam should return an error but didn't")
|
t.Errorf("GroupByParam should return an error but didn't")
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = pages.GroupBy("dummyPageMethodReturnThreeValueForTest")
|
_, err = pages.GroupBy("DummyPageMethodReturnThreeValueForTest")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("GroupByParam should return an error but didn't")
|
t.Errorf("GroupByParam should return an error but didn't")
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = pages.GroupBy("dummyPageMethodReturnErrorOnlyForTest")
|
_, err = pages.GroupBy("DummyPageMethodReturnErrorOnlyForTest")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("GroupByParam should return an error but didn't")
|
t.Errorf("GroupByParam should return an error but didn't")
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = pages.GroupBy("dummyPageMethodReturnTwoValueForTest")
|
_, err = pages.GroupBy("DummyPageMethodReturnTwoValueForTest")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("GroupByParam should return an error but didn't")
|
t.Errorf("GroupByParam should return an error but didn't")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue