go-common/app/job/main/tv/dao/ugc/del_arc_test.go
2019-04-22 18:49:16 +08:00

36 lines
712 B
Go

package ugc
import (
"fmt"
"go-common/library/database/sql"
"testing"
. "github.com/smartystreets/goconvey/convey"
)
func TestDao_DeletedArc(t *testing.T) {
Convey("TestDao_DeletedArc", t, WithDao(func(d *Dao) {
res, err := d.DeletedArc(ctx)
if err == sql.ErrNoRows {
fmt.Println("No to delete data")
return
}
So(err, ShouldBeNil)
So(res, ShouldBeGreaterThan, 0)
}))
}
func TestDao_PpDelArc(t *testing.T) {
Convey("TestDao_PpDelArc", t, WithDao(func(d *Dao) {
err := d.PpDelArc(ctx, 333)
So(err, ShouldBeNil)
}))
}
func TestDao_FinishDelArc(t *testing.T) {
Convey("TestDao_FinishDelArc", t, WithDao(func(d *Dao) {
err := d.FinishDelArc(ctx, 333)
So(err, ShouldBeNil)
}))
}