diff options
author | Wolfy-J <[email protected]> | 2018-07-28 16:36:44 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2018-07-28 16:36:44 +0300 |
commit | eccf6d31fa42eacaf06df2b593a0942535940d68 (patch) | |
tree | c72a06c5a71823c442c4584ef4adbbfc48de4ec0 /service | |
parent | 3a5d1a71b91a90741b4cc6f63b969a37a245b6f6 (diff) |
Update config_test.go
Diffstat (limited to 'service')
-rw-r--r-- | service/static/config_test.go | 9 |
1 files changed, 5 insertions, 4 deletions
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()) } |