@@ -10,7 +10,6 @@ import (
10
10
"code.gitea.io/gitea/models/db"
11
11
"code.gitea.io/gitea/models/unittest"
12
12
user_model "code.gitea.io/gitea/models/user"
13
- "code.gitea.io/gitea/modules/setting"
14
13
"code.gitea.io/gitea/services/oauth2_provider"
15
14
16
15
"github.com/golang-jwt/jwt/v5"
@@ -66,25 +65,7 @@ func TestNewAccessTokenResponse_OIDCToken(t *testing.T) {
66
65
67
66
// Scopes: openid profile email
68
67
oidcToken = createAndParseToken (t , grants [0 ])
69
- assert .Equal (t , user .Name , oidcToken .Name )
70
- assert .Equal (t , user .Name , oidcToken .PreferredUsername )
71
- assert .Equal (t , user .HTMLURL (), oidcToken .Profile )
72
- assert .Equal (t , user .AvatarLink (db .DefaultContext ), oidcToken .Picture )
73
- assert .Equal (t , user .Website , oidcToken .Website )
74
- assert .Equal (t , user .UpdatedUnix , oidcToken .UpdatedAt )
75
- assert .Equal (t , user .Email , oidcToken .Email )
76
- assert .Equal (t , user .IsActive , oidcToken .EmailVerified )
77
-
78
- // set DefaultShowFullName to true
79
- oldDefaultShowFullName := setting .UI .DefaultShowFullName
80
- setting .UI .DefaultShowFullName = true
81
- defer func () {
82
- setting .UI .DefaultShowFullName = oldDefaultShowFullName
83
- }()
84
-
85
- // Scopes: openid profile email
86
- oidcToken = createAndParseToken (t , grants [0 ])
87
- assert .Equal (t , user .FullName , oidcToken .Name )
68
+ assert .Equal (t , user .DisplayName (), oidcToken .Name )
88
69
assert .Equal (t , user .Name , oidcToken .PreferredUsername )
89
70
assert .Equal (t , user .HTMLURL (), oidcToken .Profile )
90
71
assert .Equal (t , user .AvatarLink (db .DefaultContext ), oidcToken .Picture )
0 commit comments