diff options
Diffstat (limited to 'langs/i18n/i18n_test.go')
-rw-r--r-- | langs/i18n/i18n_test.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/langs/i18n/i18n_test.go b/langs/i18n/i18n_test.go index e08210848..d9215952a 100644 --- a/langs/i18n/i18n_test.go +++ b/langs/i18n/i18n_test.go @@ -29,9 +29,9 @@ import ( "github.com/gohugoio/hugo/deps" + qt "github.com/frankban/quicktest" "github.com/gohugoio/hugo/config" "github.com/gohugoio/hugo/hugofs" - "github.com/stretchr/testify/require" ) var logger = loggers.NewErrorLogger() @@ -179,19 +179,19 @@ func doTestI18nTranslate(t testing.TB, test i18nTest, cfg config.Provider) strin } func prepareTranslationProvider(t testing.TB, test i18nTest, cfg config.Provider) *TranslationProvider { - assert := require.New(t) + c := qt.New(t) fs := hugofs.NewMem(cfg) for file, content := range test.data { err := afero.WriteFile(fs.Source, filepath.Join("i18n", file), []byte(content), 0755) - assert.NoError(err) + c.Assert(err, qt.IsNil) } tp := NewTranslationProvider() depsCfg := newDepsConfig(tp, cfg, fs) d, err := deps.New(depsCfg) - assert.NoError(err) - assert.NoError(d.LoadResources()) + c.Assert(err, qt.IsNil) + c.Assert(d.LoadResources(), qt.IsNil) return tp } @@ -233,6 +233,7 @@ func getConfig() *viper.Viper { } func TestI18nTranslate(t *testing.T) { + c := qt.New(t) var actual, expected string v := getConfig() @@ -247,7 +248,7 @@ func TestI18nTranslate(t *testing.T) { expected = test.expected } actual = doTestI18nTranslate(t, test, v) - require.Equal(t, expected, actual) + c.Assert(actual, qt.Equals, expected) } } } |