game_test.go 434 B

1234567891011121314151617181920212223
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_GameSync(t *testing.T) {
  8. Convey("work", t, WithDao(func(d *Dao) {
  9. err := d.GameSync(context.Background(), "add", 1)
  10. So(err, ShouldBeNil)
  11. }))
  12. }
  13. func Test_NewGameCache(t *testing.T) {
  14. Convey("work", t, WithDao(func(d *Dao) {
  15. res, err := d.GameList(context.TODO())
  16. So(err, ShouldBeNil)
  17. So(res, ShouldNotBeEmpty)
  18. }))
  19. }