mirror of
https://github.com/TwiN/gatus.git
synced 2025-02-16 18:21:07 +01:00
Add TestEvalWithInvalidData
This commit is contained in:
parent
8106832d69
commit
e3038f0e80
@ -20,6 +20,15 @@ func TestEval(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestEvalWithInvalidData(t *testing.T) {
|
||||||
|
path := "simple"
|
||||||
|
data := `invalid data`
|
||||||
|
_, _, err := Eval(path, []byte(data))
|
||||||
|
if err == nil {
|
||||||
|
t.Error("expected an error")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestEvalWithInvalidPath(t *testing.T) {
|
func TestEvalWithInvalidPath(t *testing.T) {
|
||||||
path := "errors"
|
path := "errors"
|
||||||
data := `{}`
|
data := `{}`
|
||||||
|
Loading…
Reference in New Issue
Block a user