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.
 
 
 

44 lines
1.1 KiB

package dao
import (
"context"
"testing"
"github.com/smartystreets/goconvey/convey"
)
func TestDaoEventsByCid(t *testing.T) {
var c = context.TODO()
convey.Convey("events by cid", t, func() {
events, err := d.EventsByCid(c, 1)
convey.So(err, convey.ShouldBeNil)
convey.So(events, convey.ShouldNotBeNil)
})
}
func TestDaoEventsByIDs(t *testing.T) {
var c = context.TODO()
convey.Convey("events by multi event ids", t, func() {
events, err := d.EventsByIDs(c, []int64{1})
convey.So(err, convey.ShouldBeNil)
convey.So(events, convey.ShouldNotBeNil)
})
}
func TestDaoLastEventByCid(t *testing.T) {
var c = context.TODO()
convey.Convey("last event by eids", t, func() {
events, err := d.EventsByIDs(c, []int64{1})
convey.So(err, convey.ShouldBeNil)
convey.So(events, convey.ShouldNotBeNil)
})
}
func TestDaoBatchLastEventIDs(t *testing.T) {
var c = context.TODO()
convey.Convey("batch last event by multi cids", t, func() {
events, err := d.BatchLastEventIDs(c, []int64{1})
convey.So(err, convey.ShouldBeNil)
convey.So(events, convey.ShouldNotBeNil)
})
}