add more tests

This commit is contained in:
kevin
2020-09-30 17:47:56 +08:00
parent 9e9ce3bf48
commit 481895d1e4
5 changed files with 13 additions and 5 deletions

View File

@@ -32,8 +32,7 @@ func TestConfigJson(t *testing.T) {
A string `json:"a"`
B int `json:"b"`
}
err = LoadConfig(tmpfile, &val)
assert.Nil(t, err)
MustLoad(tmpfile, &val)
assert.Equal(t, "foo", val.A)
assert.Equal(t, 1, val.B)
})