up_group_test.go 608 B

12345678910111213141516171819202122
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoUPGroups(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. mids = []int64{27515256, 27515304}
  11. )
  12. convey.Convey("UPGroups", t, func(ctx convey.C) {
  13. httpMock("GET", d.upGroupURL).Reply(200).JSON(`{"code":0,"data":{"items":[{"group_id":1,"group_name":"name","group_tag":"tag","font_color":"font","bg_color":"bg","note":"note","mid":11}]}}`)
  14. _, err := d.UPGroups(c, mids)
  15. ctx.Convey("Then err should be nil.groups should not be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. })
  18. })
  19. }