mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
add test for MarshalJSON
This commit is contained in:
parent
74b387bf41
commit
dfa55d2a2e
1 changed files with 11 additions and 0 deletions
|
@ -30,3 +30,14 @@ func TestNewWiFi(t *testing.T) {
|
||||||
t.Error("unable to build net wifi struct")
|
t.Error("unable to build net wifi struct")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestWiFiMarshalJSON(t *testing.T) {
|
||||||
|
exampleWiFi := buildExampleWiFi()
|
||||||
|
json, err := exampleWiFi.MarshalJSON()
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
}
|
||||||
|
if len(json) <= 0 {
|
||||||
|
t.Error("unable to marshal JSON from WiFi struct")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue