point_test.go 789 B

123456789101112131415161718192021222324252627282930313233343536
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestDaoAllPointExchangePrice(t *testing.T) {
  8. var (
  9. c = context.TODO()
  10. )
  11. convey.Convey("AllPointExchangePrice", t, func(ctx convey.C) {
  12. pe, err := d.AllPointExchangePrice(c)
  13. ctx.Convey("Error should be nil", func(ctx convey.C) {
  14. ctx.So(err, convey.ShouldBeNil)
  15. })
  16. ctx.Convey("pe should not be nil", func(ctx convey.C) {
  17. ctx.So(pe, convey.ShouldNotBeNil)
  18. })
  19. })
  20. }
  21. func TestDaoPointExchangePrice(t *testing.T) {
  22. var (
  23. c = context.TODO()
  24. month = int16(0)
  25. )
  26. convey.Convey("PointExchangePrice", t, func(ctx convey.C) {
  27. _, err := d.PointExchangePrice(c, month)
  28. ctx.Convey("Error should be nil", func(ctx convey.C) {
  29. ctx.So(err, convey.ShouldBeNil)
  30. })
  31. })
  32. }