porder_test.go 765 B

123456789101112131415161718192021222324252627282930313233343536
  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_PorderConfig(t *testing.T) {
  9. Convey("PorderConfig", t, WithDao(func(d *Dao) {
  10. p, err := d.PorderConfig(context.TODO())
  11. So(err, ShouldBeNil)
  12. So(p, ShouldNotBeNil)
  13. }))
  14. }
  15. func Test_Porder(t *testing.T) {
  16. Convey("test archive", t, WithDao(func(d *Dao) {
  17. p, err := d.Porder(context.Background(), 10098814)
  18. So(err, ShouldBeNil)
  19. So(p, ShouldNotBeNil)
  20. }))
  21. }
  22. func Test_TxUpPorder(t *testing.T) {
  23. var c = context.Background()
  24. Convey("TxUpPorder", t, WithDao(func(d *Dao) {
  25. tx, _ := d.BeginTran(c)
  26. _, err := d.TxUpPorder(tx, 0, &archive.ArcParam{})
  27. So(err, ShouldBeNil)
  28. tx.Commit()
  29. }))
  30. }