column_income_test.go 610 B

123456789101112131415161718192021222324
  1. package income
  2. import (
  3. "context"
  4. "testing"
  5. "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestIncomeInsertColumnIncome(t *testing.T) {
  8. convey.Convey("InsertColumnIncome", t, func(ctx convey.C) {
  9. var (
  10. c = context.Background()
  11. values = "(1,2,3,'2018-06-24',100,10,100,10,'2018-06-24',100)"
  12. )
  13. ctx.Convey("When everything goes positive", func(ctx convey.C) {
  14. rows, err := d.InsertColumnIncome(c, values)
  15. ctx.Convey("Then err should be nil.rows should not be nil.", func(ctx convey.C) {
  16. ctx.So(err, convey.ShouldBeNil)
  17. ctx.So(rows, convey.ShouldNotBeNil)
  18. })
  19. })
  20. })
  21. }