mirror of
https://github.com/bettercap/bettercap
synced 2025-07-14 00:53:46 -07:00
add test for Get
This commit is contained in:
parent
116ae12194
commit
07ba5e8d57
1 changed files with 10 additions and 0 deletions
|
@ -106,3 +106,13 @@ func TestWiFiAddIfNew(t *testing.T) {
|
||||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestWiFiGet(t *testing.T) {
|
||||||
|
exampleWiFi := buildExampleWiFi()
|
||||||
|
exampleAP := NewAccessPoint("my_wifi", "ff:ff:ff:ff:ff:ff", 2472, int8(0))
|
||||||
|
exampleWiFi.aps["ff:ff:ff:ff:ff:ff"] = exampleAP
|
||||||
|
_, found := exampleWiFi.Get("ff:ff:ff:ff:ff:ff")
|
||||||
|
if !found {
|
||||||
|
t.Error("unable to get access point from wifi struct with mac address")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue