This commit is contained in:
tim
2017-09-07 01:44:30 +02:00
parent 201c69e414
commit 02b6ee7146
3 changed files with 186 additions and 147 deletions

View File

@@ -20,18 +20,5 @@ staticPath = "../static"
}
// Root
assert.Equal(t, "../static", c.StaticPath)
}
func TestValidation(t *testing.T) {
const configContent = ``
var c config.Config
if _, err := toml.Decode(configContent, &c); err != nil {
t.Error(err)
}
err := c.ValidateFields()
assert.NotNil(t, err)
assert.Equal(t, "../static", c)
}