1234567891011121314151617181920212223242526272829303132 |
- package dao
- import (
- "context"
- . "github.com/smartystreets/goconvey/convey"
- "go-common/app/service/openplatform/ticket-item/model"
- "sync"
- "testing"
- )
- var (
- once sync.Once
- d *Dao
- ctx = context.TODO()
- )
- // Test_RawItems
- func TestRawItems(t *testing.T) {
- Convey("RawItems", t, func() {
- once.Do(startService)
- res, err := d.RawItems(ctx, model.DataIDs)
- So(err, ShouldBeNil)
- So(res, ShouldNotBeNil)
- So(res, ShouldNotBeEmpty)
- })
- Convey("RawItems", t, func() {
- once.Do(startService)
- res, err := d.RawItems(ctx, model.NoDataIDs)
- So(err, ShouldNotBeNil)
- So(res, ShouldBeEmpty)
- })
- }
|