column_charge_test.go 626 B

123456789101112131415161718192021222324252627
  1. package income
  2. import (
  3. "context"
  4. "testing"
  5. "time"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestIncomeColumnDailyCharge(t *testing.T) {
  9. convey.Convey("ColumnDailyCharge", t, func(ctx convey.C) {
  10. var (
  11. c = context.Background()
  12. date = time.Now()
  13. id = int64(0)
  14. limit = int(0)
  15. )
  16. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  17. columns, err := d.ColumnDailyCharge(c, date, id, limit)
  18. ctx.Convey("Then err should be nil.columns should not be nil.", func(ctx convey.C) {
  19. ctx.So(err, convey.ShouldBeNil)
  20. ctx.So(columns, convey.ShouldNotBeNil)
  21. })
  22. })
  23. })
  24. }