Merge pull request #256 from picatz/test-network-oui

Add basic network oui test
This commit is contained in:
Simone Margaritelli 2018-05-01 21:56:37 +02:00 committed by GitHub
commit d91f8e0a75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

18
network/oui_test.go Normal file
View file

@ -0,0 +1,18 @@
package network
import "testing"
func TestOuiVar(t *testing.T) {
if len(oui) <= 0 {
t.Error("unable to find any oui infromation")
}
}
func TestOuiLookup(t *testing.T) {
exampleMac := "e0:0c:7f:XX:XX:XX"
exp := "Nintendo Co."
got := OuiLookup(exampleMac)
if got != exp {
t.Fatalf("expected '%s', got '%s'", exp, got)
}
}