fix mocks and test

This commit is contained in:
Livio Spring 2023-01-30 15:34:26 +01:00
parent 90b99d4d2b
commit e5730f2494
No known key found for this signature in database
GPG key ID: 26BB1C2FA5952CF0
9 changed files with 228 additions and 223 deletions

View file

@ -130,6 +130,7 @@ func Test_GrantTypes(t *testing.T) {
c.EXPECT().GrantTypeRefreshTokenSupported().Return(false)
c.EXPECT().GrantTypeTokenExchangeSupported().Return(false)
c.EXPECT().GrantTypeJWTAuthorizationSupported().Return(false)
c.EXPECT().GrantTypeClientCredentialsSupported().Return(false)
return c
}(),
},
@ -139,13 +140,14 @@ func Test_GrantTypes(t *testing.T) {
},
},
{
"code, implicit flow, refresh token, token exchange, jwt profile",
"code, implicit flow, refresh token, token exchange, jwt profile, client_credentials",
args{
func() op.Configuration {
c := mock.NewMockConfiguration(gomock.NewController(t))
c.EXPECT().GrantTypeRefreshTokenSupported().Return(true)
c.EXPECT().GrantTypeTokenExchangeSupported().Return(true)
c.EXPECT().GrantTypeJWTAuthorizationSupported().Return(true)
c.EXPECT().GrantTypeClientCredentialsSupported().Return(true)
return c
}(),
},
@ -153,6 +155,7 @@ func Test_GrantTypes(t *testing.T) {
oidc.GrantTypeCode,
oidc.GrantTypeImplicit,
oidc.GrantTypeRefreshToken,
oidc.GrantTypeClientCredentials,
oidc.GrantTypeTokenExchange,
oidc.GrantTypeBearer,
},