bilibili-backup/app/service/main/push/dao/report_test.go

30 lines
663 B
Go
Raw Normal View History

2019-04-22 10:59:20 +08:00
package dao
import (
"context"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func Test_DelMiInvalid(t *testing.T) {
Convey("Test_DelMiInvalid", t, WithDao(func(d *Dao) {
err := d.DelMiInvalid(context.Background())
So(err, ShouldBeNil)
}))
}
func Test_DelMiUninstalled(t *testing.T) {
Convey("Test_DelMiUninstalled", t, WithDao(func(d *Dao) {
err := d.DelMiUninstalled(context.Background())
So(err, ShouldNotBeNil)
}))
}
func Test_delInvalidMiReports(t *testing.T) {
Convey("Test_delInvalidMiReports", t, WithDao(func(d *Dao) {
err := d.delInvalidMiReports(context.Background(), 1, []string{"test"})
So(err, ShouldBeNil)
}))
}