From 6a480edba1ba18939416a10cff5fbf6d73387b84 Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Sun, 22 Dec 2019 19:21:47 +0100 Subject: [PATCH] Add tests for test.go --- internal/config/test_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/internal/config/test_test.go b/internal/config/test_test.go index d3c21fbaf..371303847 100644 --- a/internal/config/test_test.go +++ b/internal/config/test_test.go @@ -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) +}