fix various bad tests

This commit is contained in:
Mike Danese
2017-04-18 13:24:18 -07:00
committed by Jeff Grafton
parent 59fc948a06
commit e48a4f0af7
7 changed files with 35 additions and 47 deletions

View File

@@ -55,7 +55,9 @@ func TestGetEnvAsIntOrFallback(t *testing.T) {
os.Setenv(key, "not-an-int")
returnVal, err := GetEnvAsIntOrFallback(key, 1)
assert.Equal(expected, returnVal)
assert.EqualError(err, "strconv.ParseInt: parsing \"not-an-int\": invalid syntax")
if err == nil {
t.Error("expected error")
}
}
func TestGetEnvAsFloat64OrFallback(t *testing.T) {