add test for WasMissed

This commit is contained in:
Kent Gruber 2018-05-01 15:00:17 -04:00
commit d94532c473

View file

@ -119,3 +119,14 @@ func TestAliases(t *testing.T) {
t.Fatalf("expected '%v', got '%v'", exp, got)
}
}
func TestWasMissed(t *testing.T) {
exampleLAN := buildExampleLAN()
exampleEndpoint := buildExampleEndpoint()
exampleLAN.hosts[exampleEndpoint.HwAddress] = exampleEndpoint
exp := false
got := exampleLAN.WasMissed(exampleEndpoint.HwAddress)
if got != exp {
t.Fatalf("expected '%v', got '%v'", exp, got)
}
}