Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'langs/language_test.go')
-rw-r--r--langs/language_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/langs/language_test.go b/langs/language_test.go
index 8783172fb..97abe77cc 100644
--- a/langs/language_test.go
+++ b/langs/language_test.go
@@ -16,11 +16,12 @@ package langs
import (
"testing"
+ qt "github.com/frankban/quicktest"
"github.com/spf13/viper"
- "github.com/stretchr/testify/require"
)
func TestGetGlobalOnlySetting(t *testing.T) {
+ c := qt.New(t)
v := viper.New()
v.Set("defaultContentLanguageInSubdir", true)
v.Set("contentDir", "content")
@@ -29,12 +30,12 @@ func TestGetGlobalOnlySetting(t *testing.T) {
lang.Set("defaultContentLanguageInSubdir", false)
lang.Set("paginatePath", "side")
- require.True(t, lang.GetBool("defaultContentLanguageInSubdir"))
- require.Equal(t, "side", lang.GetString("paginatePath"))
+ c.Assert(lang.GetBool("defaultContentLanguageInSubdir"), qt.Equals, true)
+ c.Assert(lang.GetString("paginatePath"), qt.Equals, "side")
}
func TestLanguageParams(t *testing.T) {
- assert := require.New(t)
+ c := qt.New(t)
v := viper.New()
v.Set("p1", "p1cfg")
@@ -43,6 +44,6 @@ func TestLanguageParams(t *testing.T) {
lang := NewDefaultLanguage(v)
lang.SetParam("p1", "p1p")
- assert.Equal("p1p", lang.Params()["p1"])
- assert.Equal("p1cfg", lang.Get("p1"))
+ c.Assert(lang.Params()["p1"], qt.Equals, "p1p")
+ c.Assert(lang.Get("p1"), qt.Equals, "p1cfg")
}