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