mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-07 08:44:07 +01:00
14 lines
239 B
Go
14 lines
239 B
Go
|
package messages
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestHashID(t *testing.T) {
|
||
|
hashedID, hashedStringId := HashID("alice")
|
||
|
enc := HashIDToString(hashedID)
|
||
|
if enc != hashedStringId {
|
||
|
t.Errorf("expected %s, got %s", hashedStringId, enc)
|
||
|
}
|
||
|
}
|