Exemple #1
0
func TestFindCurrentTracks(t *T) {
	beforeTrackTest()
	tracks, err := table.FindCurrentTracks(time.Now())
	rdtest.Assert(t, err == nil, err)
	rdtest.Assert(t, len(tracks) == 3, "%d", len(tracks))
	rdtest.Assert(t, tracks[0].TrackId == 1)
	rdtest.Assert(t, tracks[1].TrackId == 2)
	rdtest.Assert(t, tracks[2].TrackId == 3)
}
Exemple #2
0
func FindCurrentClues(now time.Time) ([]*record.Clue, error) {
	//find current tracks
	tracks, err := table.FindCurrentTracks(now)
	if err != nil {
		return nil, err
	}

	clueIds := record.ExtractClueIdsFromTracks(tracks)
	return table.FindManyClues(clueIds)
}