Improve testing coverage

This commit is contained in:
TwinProduction committed 2021-01-09 22:55:36 -05:00
1 parent 150e33a1c7
commit 91a9fa5274
3 files changed
+138

No files matched your search

+10
View File
@@ -17,6 +17,16 @@ func TestGetBeforeConfigIsLoaded(t *testing.T) {
t.Fatal("Should've panicked because the configuration hasn't been loaded yet")
}
func TestSet(t *testing.T) {
if config != nil {
t.Fatal("config should've been nil")
}
Set(&Config{})
if config == nil {
t.Fatal("config shouldn't have been nil")
}
}
func TestLoadFileThatDoesNotExist(t *testing.T) {
err := Load("file-that-does-not-exist.yaml")
if err == nil {