mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-22 07:53:38 +01:00
Add test for invalid path
This commit is contained in:
parent
541e0264ab
commit
a48ec41bca
@ -20,6 +20,15 @@ func TestEval(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestEvalWithInvalidPath(t *testing.T) {
|
||||
path := "errors"
|
||||
data := `{}`
|
||||
_, _, err := Eval(path, []byte(data))
|
||||
if err == nil {
|
||||
t.Error("Expected error, but got", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEvalWithLongSimpleWalk(t *testing.T) {
|
||||
path := "long.simple.walk"
|
||||
data := `{"long": {"simple": {"walk": "value"}}}`
|
||||
|
Loading…
Reference in New Issue
Block a user