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:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-10 22:05:17 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-08-12 14:26:32 +0300
commit9e571827055dedb46b78c5db3d17d6913f14870b (patch)
treef5f0108afe0c9385ff6dc27664943d9f719f57ad /hugofs/fs_test.go
parent6027ee11082d0b9d72de1d4d1980a702be294ad2 (diff)
tests: Convert from testify to quicktest
Diffstat (limited to 'hugofs/fs_test.go')
-rw-r--r--hugofs/fs_test.go35
1 files changed, 18 insertions, 17 deletions
diff --git a/hugofs/fs_test.go b/hugofs/fs_test.go
index 95900e6a2..47a9482f5 100644
--- a/hugofs/fs_test.go
+++ b/hugofs/fs_test.go
@@ -16,45 +16,46 @@ package hugofs
import (
"testing"
+ qt "github.com/frankban/quicktest"
+ "github.com/gohugoio/hugo/htesting/hqt"
"github.com/spf13/afero"
"github.com/spf13/viper"
- "github.com/stretchr/testify/assert"
)
func TestNewDefault(t *testing.T) {
+ c := qt.New(t)
v := viper.New()
f := NewDefault(v)
- assert.NotNil(t, f.Source)
- assert.IsType(t, new(afero.OsFs), f.Source)
- assert.NotNil(t, f.Destination)
- assert.IsType(t, new(afero.OsFs), f.Destination)
- assert.NotNil(t, f.Os)
- assert.IsType(t, new(afero.OsFs), f.Os)
- assert.Nil(t, f.WorkingDir)
+ c.Assert(f.Source, qt.Not(qt.IsNil))
+ c.Assert(f.Source, hqt.IsSameType, new(afero.OsFs))
+ c.Assert(f.Os, qt.Not(qt.IsNil))
+ c.Assert(f.WorkingDir, qt.IsNil)
- assert.IsType(t, new(afero.OsFs), Os)
}
func TestNewMem(t *testing.T) {
+ c := qt.New(t)
v := viper.New()
f := NewMem(v)
- assert.NotNil(t, f.Source)
- assert.IsType(t, new(afero.MemMapFs), f.Source)
- assert.NotNil(t, f.Destination)
- assert.IsType(t, new(afero.MemMapFs), f.Destination)
- assert.IsType(t, new(afero.OsFs), f.Os)
- assert.Nil(t, f.WorkingDir)
+ c.Assert(f.Source, qt.Not(qt.IsNil))
+ c.Assert(f.Source, hqt.IsSameType, new(afero.MemMapFs))
+ c.Assert(f.Destination, qt.Not(qt.IsNil))
+ c.Assert(f.Destination, hqt.IsSameType, new(afero.MemMapFs))
+ c.Assert(f.Os, hqt.IsSameType, new(afero.OsFs))
+ c.Assert(f.WorkingDir, qt.IsNil)
}
func TestWorkingDir(t *testing.T) {
+ c := qt.New(t)
v := viper.New()
v.Set("workingDir", "/a/b/")
f := NewMem(v)
- assert.NotNil(t, f.WorkingDir)
- assert.IsType(t, new(afero.BasePathFs), f.WorkingDir)
+ c.Assert(f.WorkingDir, qt.Not(qt.IsNil))
+ c.Assert(f.WorkingDir, hqt.IsSameType, new(afero.BasePathFs))
+
}