diff --git a/network/lan_test.go b/network/lan_test.go index a7e709a1..eb5529ce 100644 --- a/network/lan_test.go +++ b/network/lan_test.go @@ -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") + } +}