diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-01-03 17:28:51 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-01-07 17:06:35 +0100 |
commit | 45e3ed517a17648d54e8ce33618a8f251cfec603 (patch) | |
tree | 160a1bbd03a107be08ae76018fb382268365e2a1 /hugolib/pagination_test.go | |
parent | 24a286791f37cbf6638b37f29386949045d0bba2 (diff) |
all: Refactor to non-global logger
Note that this looks like overkill for just the logger, and that is correct,
but this will make sense once we start with the template handling etc.
Updates #2701
Diffstat (limited to 'hugolib/pagination_test.go')
-rw-r--r-- | hugolib/pagination_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/hugolib/pagination_test.go b/hugolib/pagination_test.go index 2571d3c82..125840c66 100644 --- a/hugolib/pagination_test.go +++ b/hugolib/pagination_test.go @@ -225,7 +225,7 @@ func doTestPaginator(t *testing.T, useViper bool) { viper.Set("paginate", -1) } pages := createTestPages(12) - s := newSiteDefaultLang() + s := NewSiteDefaultLang() n1 := s.newHomePage() n2 := s.newHomePage() n1.Data["Pages"] = pages @@ -253,7 +253,7 @@ func doTestPaginator(t *testing.T, useViper bool) { samePaginator, _ := n1.Paginator() assert.Equal(t, paginator1, samePaginator) - p, _ := NewPage("test") + p, _ := pageTestSite.NewPage("test") _, err = p.Paginator() assert.NotNil(t, err) } @@ -262,7 +262,7 @@ func TestPaginatorWithNegativePaginate(t *testing.T) { testCommonResetState() viper.Set("paginate", -1) - s := newSiteDefaultLang() + s := NewSiteDefaultLang() _, err := s.newHomePage().Paginator() assert.NotNil(t, err) } @@ -284,7 +284,7 @@ func doTestPaginate(t *testing.T, useViper bool) { } pages := createTestPages(6) - s := newSiteDefaultLang() + s := NewSiteDefaultLang() n1 := s.newHomePage() n2 := s.newHomePage() @@ -311,13 +311,13 @@ func doTestPaginate(t *testing.T, useViper bool) { assert.Nil(t, err) assert.Equal(t, paginator2, paginator1.Next()) - p, _ := NewPage("test") + p, _ := pageTestSite.NewPage("test") _, err = p.Paginate(pages) assert.NotNil(t, err) } func TestInvalidOptions(t *testing.T) { - s := newSiteDefaultLang() + s := NewSiteDefaultLang() n1 := s.newHomePage() _, err := n1.Paginate(createTestPages(1), 1, 2) assert.NotNil(t, err) @@ -331,7 +331,7 @@ func TestPaginateWithNegativePaginate(t *testing.T) { testCommonResetState() viper.Set("paginate", -1) - s := newSiteDefaultLang() + s := NewSiteDefaultLang() _, err := s.newHomePage().Paginate(createTestPages(2)) assert.NotNil(t, err) } @@ -353,7 +353,7 @@ func TestPaginatorFollowedByPaginateShouldFail(t *testing.T) { testCommonResetState() viper.Set("paginate", 10) - s := newSiteDefaultLang() + s := NewSiteDefaultLang() n1 := s.newHomePage() n2 := s.newHomePage() @@ -371,7 +371,7 @@ func TestPaginateFollowedByDifferentPaginateShouldFail(t *testing.T) { testCommonResetState() viper.Set("paginate", 10) - s := newSiteDefaultLang() + s := NewSiteDefaultLang() n1 := s.newHomePage() n2 := s.newHomePage() |