mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
add test for Clear
This commit is contained in:
parent
6911941fa2
commit
660f326806
1 changed files with 10 additions and 0 deletions
|
@ -128,3 +128,13 @@ func TestWiFiGetClient(t *testing.T) {
|
|||
t.Error("unable to get client from wifi struct with mac address")
|
||||
}
|
||||
}
|
||||
|
||||
func TestWiFiClear(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
|
||||
exampleWiFi.Clear()
|
||||
if len(exampleWiFi.aps) != 0 {
|
||||
t.Error("unable to clear known access point for wifi struct")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue