修改部分枚举字段的编号与注释确保 0 值的正确语义
This commit is contained in:
@@ -16,13 +16,13 @@ type mockSessionService struct {
|
||||
func (m *mockSessionService) Find(ctx context.Context, token string) (*AuthContext, error) {
|
||||
panic("implement me")
|
||||
}
|
||||
func (m *mockSessionService) Refresh(ctx context.Context, refreshToken string, config ...SessionConfig) (*TokenDetails, error) {
|
||||
func (m *mockSessionService) Refresh(ctx context.Context, refreshToken string) (*TokenDetails, error) {
|
||||
panic("implement me")
|
||||
}
|
||||
func (m *mockSessionService) Remove(ctx context.Context, accessToken, refreshToken string) error {
|
||||
panic("implement me")
|
||||
}
|
||||
func (m *mockSessionService) Create(ctx context.Context, auth AuthContext, config ...SessionConfig) (*TokenDetails, error) {
|
||||
func (m *mockSessionService) Create(ctx context.Context, auth AuthContext, remember bool) (*TokenDetails, error) {
|
||||
return m.createFunc(ctx, auth)
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ func Test_authService_OauthClientCredentials(t *testing.T) {
|
||||
name: "成功 - 机密客户端 (Spec=0)",
|
||||
args: args{
|
||||
ctx: context.Background(),
|
||||
client: &models.Client{ID: 1, Spec: 0},
|
||||
client: &models.Client{ID: 1, Spec: 3},
|
||||
scope: []string{"read", "write"},
|
||||
},
|
||||
mockCreateErr: nil,
|
||||
|
||||
Reference in New Issue
Block a user