File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 5
5
package models
6
6
7
7
import (
8
- "strings"
9
8
"testing"
10
9
"time"
11
10
12
11
"code.gitea.io/gitea/modules/util"
12
+ "github.com/keybase/go-crypto/openpgp"
13
13
14
14
"github.com/stretchr/testify/assert"
15
15
)
@@ -408,4 +408,11 @@ FkzJRllII58iAA==
408
408
assert .NoError (t , err )
409
409
410
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
411
418
}
You can’t perform that action at this time.
0 commit comments