We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10fbd80 commit 030aa9cCopy full SHA for 030aa9c
models/gpg_key_test.go
@@ -5,11 +5,11 @@
5
package models
6
7
import (
8
- "strings"
9
"testing"
10
"time"
11
12
"code.gitea.io/gitea/modules/util"
+ "github.com/keybase/go-crypto/openpgp"
13
14
"github.com/stretchr/testify/assert"
15
)
@@ -408,4 +408,11 @@ FkzJRllII58iAA==
408
assert.NoError(t, err)
409
410
assert.Equal(t, 1, len(ekey.Identities)) //Should not output the revoked uid
411
+
412
+ //Inspired from https://github.com/keybase/go-crypto/blob/master/openpgp/keys_test.go#L519
413
+ var identities []*openpgp.Identity
414
+ for _, identity := range ekey.Identities {
415
+ identities = append(identities, identity)
416
+ }
417
+ assert.Contains(t, identities[0].Name, "Alden Peeters <alden.peeters@") //Should not output the revoked uid
418
}
0 commit comments