mirror of
https://github.com/bettercap/bettercap
synced 2025-07-14 00:53:46 -07:00
add test for Has
This commit is contained in:
parent
effbf951b5
commit
050eaaf6bc
1 changed files with 9 additions and 0 deletions
|
@ -134,3 +134,12 @@ func TestWasMissed(t *testing.T) {
|
|||
// TODO Add TestRemove after removing unnecessary ip argument
|
||||
// func TestRemove(t *testing.T) {
|
||||
// }
|
||||
|
||||
func TestHas(t *testing.T) {
|
||||
exampleLAN := buildExampleLAN()
|
||||
exampleEndpoint := buildExampleEndpoint()
|
||||
exampleLAN.hosts[exampleEndpoint.HwAddress] = exampleEndpoint
|
||||
if !exampleLAN.Has(exampleEndpoint.IpAddress) {
|
||||
t.Error("unable find a known IP address in LAN struct")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue