go-common/app/job/main/growup/dao/income/bgm_income_test.go

25 lines
586 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package income
import (
"context"
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestIncomeInsertBgmIncome(t *testing.T) {
convey.Convey("InsertBgmIncome", t, func(ctx convey.C) {
var (
c = context.Background()
values = "(1,2,3,4,5,6,7,'2018-06-24',100,100)"
)
ctx.Convey("When everything goes positive", func(ctx convey.C) {
rows, err := d.InsertBgmIncome(c, values)
ctx.Convey("Then err should be nil.rows should not be nil.", func(ctx convey.C) {
ctx.So(err, convey.ShouldBeNil)
ctx.So(rows, convey.ShouldNotBeNil)
})
})
})
}