You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
609 B

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)
})
}