Add and revise new unit tests on agents

This commit is contained in:
armirveliaj
2024-06-18 10:06:06 -04:00
committed by Dan Christian Bogos
parent d3975b4d2f
commit 2d6912657d
3 changed files with 106 additions and 0 deletions

View File

@@ -89,3 +89,13 @@ func TestHandleChannelDestroyedFail(t *testing.T) {
t.Errorf("Expected ev to not change, received <%v>", utils.ToJSON(ev))
}
}
func TestAstAgentV1WarnDisconnect(t *testing.T) {
tAsteriskAgent := &AsteriskAgent{}
tMap := map[string]any{}
tString := ""
err := tAsteriskAgent.V1WarnDisconnect(nil, tMap, &tString)
if err != utils.ErrNotImplemented {
t.Errorf("Expected error: %v, got: %v", utils.ErrNotImplemented, err)
}
}