feat: merge registration invite and verification input
This commit is contained in:
@@ -9,6 +9,26 @@ import (
|
||||
"github.com/tinode/chat/server/store/types"
|
||||
)
|
||||
|
||||
type registrationTestValidator struct{}
|
||||
|
||||
func (registrationTestValidator) Init(string) error { return nil }
|
||||
func (registrationTestValidator) IsInitialized() bool { return true }
|
||||
func (registrationTestValidator) PreCheck(value string, _ map[string]any) (string, error) {
|
||||
return "tel:" + value, nil
|
||||
}
|
||||
func (registrationTestValidator) Request(types.TenantID, types.Uid, string, string, string, []byte) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
func (registrationTestValidator) ResetSecret(types.TenantID, string, string, string, []byte, map[string]any) error {
|
||||
return nil
|
||||
}
|
||||
func (registrationTestValidator) Check(types.TenantID, types.Uid, string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
func (registrationTestValidator) Remove(types.TenantID, types.Uid, string) error { return nil }
|
||||
func (registrationTestValidator) Delete(types.TenantID, types.Uid) error { return nil }
|
||||
func (registrationTestValidator) TempAuthScheme() (string, error) { return "code", nil }
|
||||
|
||||
func TestResolveRegistrationAccount(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user