Пример #1
0
func TestAddUser(t *testing.T) {
	u := new(models.User)
	u.Name = "tom"
	u.Account = "*****@*****.**" + strconv.FormatInt(time.Now().Unix(), 10)
	u.Password = "******"
	if AddUser(u) == nil {
		userId = u.Id
		t.Log("add user", u.Id, u.Account)
	} else {
		t.Error("failed to add user")
	}
}