diff --git a/openpgp/keys_test.go b/openpgp/keys_test.go index 89e3b8cb..c1478771 100644 --- a/openpgp/keys_test.go +++ b/openpgp/keys_test.go @@ -950,6 +950,23 @@ func TestNotationPacket(t *testing.T) { t.Fatal(err) } + assertNotationPackets(t, keys) + + serializedEntity := bytes.NewBuffer(nil) + err = keys[0].Serialize(serializedEntity) + if err != nil { + t.Fatal(err) + } + + keys, err = ReadKeyRing(serializedEntity) + if err != nil { + t.Fatal(err) + } + + assertNotationPackets(t, keys) +} + +func assertNotationPackets(t *testing.T, keys EntityList) { if len(keys) != 1 { t.Errorf("Failed to accept key, %d", len(keys)) }