http_client_test.go 568 B

12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoIsOriginHot(t *testing.T) {
  8. convey.Convey("IsOriginHot", t, func(ctx convey.C) {
  9. var (
  10. oid = int64(1)
  11. rpID = int64(1)
  12. tp = int(1)
  13. )
  14. ctx.Convey("When everything gose positive", func(ctx convey.C) {
  15. isHot, err := d.IsOriginHot(context.Background(), oid, rpID, tp)
  16. ctx.Convey("Then err should be nil.isHot should not be nil.", func(ctx convey.C) {
  17. ctx.So(err, convey.ShouldBeNil)
  18. ctx.So(isHot, convey.ShouldNotBeNil)
  19. })
  20. })
  21. })
  22. }