req_http_test.go 694 B

1234567891011121314151617181920212223242526272829303132333435
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoCompareInfo(t *testing.T) {
  8. var (
  9. c = context.Background()
  10. rid = int64(1)
  11. )
  12. convey.Convey("CompareInfo", t, func(ctx convey.C) {
  13. err := d.CompareInfo(c, rid)
  14. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  15. ctx.So(err, convey.ShouldBeNil)
  16. })
  17. })
  18. }
  19. func TestDaoSendMail(t *testing.T) {
  20. var (
  21. c = context.Background()
  22. rid = int64(1)
  23. status = int64(1)
  24. )
  25. convey.Convey("SendMail", t, func(ctx convey.C) {
  26. err := d.SendMail(c, rid, status)
  27. ctx.Convey("Then err should be nil.", func(ctx convey.C) {
  28. ctx.So(err, convey.ShouldBeNil)
  29. })
  30. })
  31. }