mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-13 10:21:10 +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)
|
||
|
}
|
||
|
}
|