MCPcopy Create free account
hub / github.com/dearcode/candy / TestLogin

Function TestLogin

client/candy_test.go:103–114  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

101}
102
103func TestLogin(t *testing.T) {
104 for name, id := range userNames {
105 uid, err := client.Login(name, passwd[name])
106 if err != nil {
107 t.Fatalf("Login error:%v", err)
108 }
109 if uid != id {
110 t.Fatalf("Login user:%s, expect id:%d, recv id:%d", name, id, uid)
111 }
112 t.Logf("login success, userID:%d userName:%v userPasswd:%v", uid, name, name)
113 }
114}
115
116func TestUpdateUserInfo(t *testing.T) {
117 for name := range userNames {

Callers

nothing calls this directly

Calls 1

LoginMethod · 0.65

Tested by

no test coverage detected