go-common/app/admin/main/videoup/dao/archive/forbid_test.go

39 lines
800 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package archive
import (
"context"
"testing"
"go-common/app/admin/main/videoup/model/archive"
. "github.com/smartystreets/goconvey/convey"
)
func Test_Forbid(t *testing.T) {
Convey("test archive", t, WithDao(func(d *Dao) {
af, err := d.Forbid(context.Background(), 10098814)
So(err, ShouldBeNil)
So(af, ShouldNotBeNil)
}))
}
func Test_TxUpForbid(t *testing.T) {
var c = context.Background()
Convey("TxUpForbid", t, WithDao(func(d *Dao) {
tx, _ := d.BeginTran(c)
_, err := d.TxUpForbid(tx, &archive.ForbidAttr{})
So(err, ShouldBeNil)
tx.Commit()
}))
}
func Test_TxUpFlowID(t *testing.T) {
var c = context.Background()
Convey("TxUpFlowID", t, WithDao(func(d *Dao) {
tx, _ := d.BeginTran(c)
_, err := d.TxUpFlowID(tx, 0, 0)
So(err, ShouldBeNil)
tx.Commit()
}))
}