forbid_test.go 800 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package archive
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/app/admin/main/videoup/model/archive"
  6. . "github.com/smartystreets/goconvey/convey"
  7. )
  8. func Test_Forbid(t *testing.T) {
  9. Convey("test archive", t, WithDao(func(d *Dao) {
  10. af, err := d.Forbid(context.Background(), 10098814)
  11. So(err, ShouldBeNil)
  12. So(af, ShouldNotBeNil)
  13. }))
  14. }
  15. func Test_TxUpForbid(t *testing.T) {
  16. var c = context.Background()
  17. Convey("TxUpForbid", t, WithDao(func(d *Dao) {
  18. tx, _ := d.BeginTran(c)
  19. _, err := d.TxUpForbid(tx, &archive.ForbidAttr{})
  20. So(err, ShouldBeNil)
  21. tx.Commit()
  22. }))
  23. }
  24. func Test_TxUpFlowID(t *testing.T) {
  25. var c = context.Background()
  26. Convey("TxUpFlowID", t, WithDao(func(d *Dao) {
  27. tx, _ := d.BeginTran(c)
  28. _, err := d.TxUpFlowID(tx, 0, 0)
  29. So(err, ShouldBeNil)
  30. tx.Commit()
  31. }))
  32. }