grpc_test.go 549 B

123456789101112131415161718192021222324
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoAccountCards(t *testing.T) {
  8. convey.Convey("AccountCards", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. mids = []int64{46333}
  12. )
  13. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  14. cards, err := d.AccountCards(c, mids)
  15. ctx.Convey("Then err should be nil.cards should not be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. ctx.So(cards, convey.ShouldHaveLength, 1)
  18. })
  19. })
  20. })
  21. }