From 732e97a2944bdb30f8fdd2838674912a87fe0a46 Mon Sep 17 00:00:00 2001 From: Timothy Date: Fri, 27 Oct 2017 14:50:35 +0800 Subject: [PATCH] add test case --- settings_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/settings_test.go b/settings_test.go index da7efb9..2f606f4 100644 --- a/settings_test.go +++ b/settings_test.go @@ -13,6 +13,11 @@ func TestLoadSetting(t *testing.T) { } if settings.IPUrl == "" { - t.Error("Cannot load ip_url from config file") + t.Error("cannot load ip_url from config file") + } + + err = LoadSettings("./file/does/not/exists", &settings) + if err == nil { + t.Error("file doesn't exist, should return error") } }