Esempio n. 1
0
func TestUpdateTeamStartTime(t *T) {
	beforeTeamTest()
	startTime := time.Date(2016, 7, 2, 7, 7, 0, 0, time.UTC)
	err := table.UpdateTeamStartTime(100, startTime)
	rdtest.Assert(t, err == nil, err)
	team, err := table.FindTeam(100)
	rdtest.Assert(t, err == nil, err)
	rdtest.Assert(t, team.StartTime.Valid)
	rdtest.Assert(t, team.StartTime.Time.Equal(startTime), team.StartTime)
}
Esempio n. 2
0
func setStartTimes(ctx *_Context) error {
	req := ctx.req.(*setStartTimesReq)
	for _, teamId := range req.TeamIds {
		if err := table.UpdateTeamStartTime(teamId, req.StartTime); err != nil {
			return err
		}
	}

	return nil
}