fix: adjust phone registration username flow

This commit is contained in:
richjohnrambo
2026-08-20 12:08:55 +08:00
parent 73ddb2d9fa
commit 43e8af68d6
7 changed files with 202 additions and 78 deletions
+5 -2
View File
@@ -1336,8 +1336,11 @@ func TestDispatchAccNew(t *testing.T) {
if lvl := p["authlvl"].(string); lvl != auth.LevelAuth.String() {
t.Errorf("Auth level: expected '%s', found '%s'.", auth.LevelAuth.String(), lvl)
}
if desc := p["desc"].(*MsgTopicDesc); desc.Public.(string) != public {
t.Errorf("Public: expected '%s', found '%s'.", public, desc.Public.(string))
if username := p["username"].(string); username != "alice" {
t.Errorf("Username: expected 'alice', found '%s'.", username)
}
if desc := p["desc"].(*MsgTopicDesc); desc.Public.(map[string]any)["fn"] != "alice" {
t.Errorf("Public fn: expected 'alice', found '%v'.", desc.Public)
}
} else {
t.Error("Response must contain a ctrl message.")