summaryrefslogtreecommitdiff
path: root/service/static
diff options
context:
space:
mode:
Diffstat (limited to 'service/static')
-rw-r--r--service/static/config_test.go9
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())
}