account_test.go 735 B

1234567891011121314151617181920212223242526272829303132
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestService_Attentions(t *testing.T) {
  8. Convey("test account attentions", t, WithService(func(s *Service) {
  9. var mid int64 = 27515256
  10. res, err := s.Attentions(context.Background(), mid)
  11. So(err, ShouldBeNil)
  12. So(len(res), ShouldBeGreaterThan, 0)
  13. Println(len(res))
  14. }))
  15. }
  16. func TestService_Card(t *testing.T) {
  17. Convey("test account card", t, WithService(func(s *Service) {
  18. var (
  19. mid int64 = 27515256
  20. loginID int64 = 37515257
  21. topPhoto = true
  22. article = true
  23. )
  24. res, err := s.Card(context.Background(), mid, loginID, topPhoto, article)
  25. So(err, ShouldBeNil)
  26. So(res, ShouldNotBeNil)
  27. }))
  28. }