func TestStartProgressForClueTeam(t *T) { beforeTeamProgressTest() err := table.StartProgress(3, 1) rdtest.Assert(t, err == nil, err) _, err = table.FindProgressByClueTeam(3, 1) rdtest.Assert(t, err == nil, err) }
func TestFinishProgressForClueTeam(t *T) { beforeTeamProgressTest() now := time.Now() err := table.FinishProgressForClueTeam(now, 1, 1) rdtest.Assert(t, err == nil, err) p, err := table.FindProgressByClueTeam(1, 1) rdtest.Assert(t, err == nil, err) rdtest.Assert( t, int64(math.Abs(float64(p.AnswerTime.Time.Unix()-now.Unix()))) <= 1, "%d != %d", p.AnswerTime.Time.Unix(), now.Unix()) }