upper_staff_test.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. package archive
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestArchiveStaff(t *testing.T) {
  8. convey.Convey("Staff", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. mid = int64(27515258)
  12. )
  13. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  14. aids, err := d.Staff(c, mid)
  15. ctx.Convey("Then err should be nil.aids should not be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. ctx.So(len(aids), convey.ShouldBeGreaterThanOrEqualTo, 0)
  18. })
  19. })
  20. })
  21. }
  22. func TestArchiveStaffs(t *testing.T) {
  23. convey.Convey("Staffs", t, func(ctx convey.C) {
  24. var (
  25. c = context.Background()
  26. mids = []int64{27515258}
  27. )
  28. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  29. aidm, err := d.Staffs(c, mids)
  30. ctx.Convey("Then err should be nil.aidm should not be nil.", func(ctx convey.C) {
  31. ctx.So(err, convey.ShouldBeNil)
  32. ctx.So(aidm, convey.ShouldNotBeNil)
  33. })
  34. })
  35. })
  36. }
  37. func TestArchiveStaffAid(t *testing.T) {
  38. convey.Convey("StaffAid", t, func(ctx convey.C) {
  39. var (
  40. c = context.Background()
  41. aid = int64(10110188)
  42. )
  43. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  44. mids, err := d.StaffAid(c, aid)
  45. ctx.Convey("Then err should be nil.mids should not be nil.", func(ctx convey.C) {
  46. ctx.So(err, convey.ShouldBeNil)
  47. ctx.So(mids, convey.ShouldNotBeNil)
  48. })
  49. })
  50. })
  51. }