user_card_test.go 419 B

12345678910111213141516
  1. package archive
  2. import (
  3. "context"
  4. . "github.com/smartystreets/goconvey/convey"
  5. "testing"
  6. )
  7. func TestDao_GetUserCard(t *testing.T) {
  8. Convey("GetUserCard", t, WithDao(func(d *Dao) {
  9. httpMock("GET", d.userCardURL).Reply(200).JSON(`{"code":0,"data":{"has":100}}`)
  10. card, err := d.GetUserCard(context.Background(), 27515615)
  11. t.Logf("GetUserCard error(%v)\r\n card(%+v)", err, card)
  12. So(err, ShouldBeNil)
  13. }))
  14. }