Add tests for test.go

This commit is contained in:
Theresa Gresch 2019-12-22 19:21:47 +01:00
parent 228682400b
commit 6a480edba1

View file

@ -37,3 +37,21 @@ func TestNewTestConfig(t *testing.T) {
assert.IsType(t, &gorm.DB{}, db)
}
func TestNewTestParamsError(t *testing.T) {
c := NewTestParamsError()
assert.IsType(t, new(Params), c)
assert.Equal(t, util.ExpandedFilename("../.."), c.AssetsPath)
assert.Equal(t, "../../assets/testdata/cache", c.CachePath)
assert.False(t, c.Debug)
}
func TestNewTestErrorConfig(t *testing.T) {
c := NewTestErrorConfig()
db := c.Db()
assert.IsType(t, &gorm.DB{}, db)
}