From eccf6d31fa42eacaf06df2b593a0942535940d68 Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sat, 28 Jul 2018 16:36:44 +0300 Subject: Update config_test.go --- service/static/config_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'service/static') diff --git a/service/static/config_test.go b/service/static/config_test.go index 18168d59..b7bf4fd7 100644 --- a/service/static/config_test.go +++ b/service/static/config_test.go @@ -20,7 +20,7 @@ func Test_Config_Hydrate(t *testing.T) { } func Test_Config_Hydrate_Error(t *testing.T) { - cfg := &mockCfg{`{"dir": "/dir/"}`} + cfg := &mockCfg{`{"enable": true,"dir": "/dir/"}`} c := &Config{} assert.Error(t, c.Hydrate(cfg)) @@ -36,7 +36,8 @@ func TestConfig_Forbids(t *testing.T) { } func TestConfig_Valid(t *testing.T) { - assert.NoError(t, (&Config{Dir: "./"}).Valid()) - assert.Error(t, (&Config{Dir: "./config.go"}).Valid()) - assert.Error(t, (&Config{Dir: "./dir/"}).Valid()) + assert.NoError(t, (&Config{Enable: true, Dir: "./"}).Valid()) + assert.Error(t, (&Config{Enable: true, Dir: "./config.go"}).Valid()) + assert.NoError(t, (&Config{Dir: "./dir/"}).Valid()) + assert.Error(t, (&Config{Enable: true. Dir: "./dir/"}).Valid()) } -- cgit v1.2.3