mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
add test for WasMissed
This commit is contained in:
parent
50ebf3e53a
commit
d94532c473
1 changed files with 11 additions and 0 deletions
|
@ -119,3 +119,14 @@ func TestAliases(t *testing.T) {
|
||||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue