mirror of
https://github.com/bettercap/bettercap
synced 2025-07-31 12:10:10 -07:00
add test for Remove
This commit is contained in:
parent
0024434944
commit
aa69d7499a
1 changed files with 13 additions and 0 deletions
|
@ -80,3 +80,16 @@ func TestWiFiList(t *testing.T) {
|
||||||
t.Fatalf("expected '%v', got '%v'", exp, got)
|
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestWiFiRemove(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:f1"] = exampleAP
|
||||||
|
exampleWiFi.aps["ff:ff:ff:ff:ff:f2"] = exampleAP
|
||||||
|
exampleWiFi.Remove("ff:ff:ff:ff:ff:f1")
|
||||||
|
exp := 1
|
||||||
|
got := len(exampleWiFi.List())
|
||||||
|
if got != exp {
|
||||||
|
t.Fatalf("expected '%v', got '%v'", exp, got)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue