X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=pkg%2Fkey%2Fkey_test.go;h=0226d125845a5f9125e6fc93a172da049cd9d2fa;hb=8c37c3f703c1efdb7c902e15f71a9d32e656430a;hp=1e594fe75c6ae875e25f0d7a8cb8add9660bcee7;hpb=203da80978a9c2924d02c039298ee80bafda14ff;p=epoint diff --git a/pkg/key/key_test.go b/pkg/key/key_test.go index 1e594fe..0226d12 100644 --- a/pkg/key/key_test.go +++ b/pkg/key/key_test.go @@ -37,6 +37,19 @@ func TestKey(t *testing.T) { } } +func TestId(t *testing.T) { + idwant := "E51F405B809FA2DEA760603F9D33F730611CBCD9" + key, err := Issuer([]byte("rand"), "") + if err != nil { + t.Errorf("Issuer failed: %s", err) + return + } + id := Id(key) + if id != idwant { + t.Errorf("Id failed: expected %s, got %s", idwant, id) + } +} + func TestIssuerHolder(t *testing.T) { denomination := "1/100 EUR" priv, err := Issuer([]byte("issuer-rand"), denomination)