Beispiel #1
0
func getDashboardClues(ctx *_Context) error {
	clues, err := biz.FindCurrentClues(time.Now())
	if err != nil {
		return err
	}

	ctx.resp = clues
	return nil
}
Beispiel #2
0
func TestFindCurrentClues(t *testing.T) {
	beforeClueTest()

	clues, err := biz.FindCurrentClues(clueTestNow)

	rdtest.Assert(t, err == nil, err)
	rdtest.Assert(t, len(clues) == 4)
	rdtest.Assert(t, clues[0].ClueId == 1)
	rdtest.Assert(t, clues[1].ClueId == 2)
}