recheck_test.go 912 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package archive
  2. import (
  3. "context"
  4. . "github.com/smartystreets/goconvey/convey"
  5. "testing"
  6. )
  7. func Test_RecheckByAid(t *testing.T) {
  8. Convey("test archive", t, WithDao(func(d *Dao) {
  9. _, err := d.RecheckByAid(context.Background(), 1, 10098814)
  10. So(err, ShouldBeNil)
  11. }))
  12. }
  13. func Test_RecheckIDByAID(t *testing.T) {
  14. Convey("test archive", t, WithDao(func(d *Dao) {
  15. _, _, err := d.RecheckIDByAID(context.Background(), 1, []int64{10098814})
  16. So(err, ShouldBeNil)
  17. }))
  18. }
  19. func Test_RecheckStateMap(t *testing.T) {
  20. Convey("test archive", t, WithDao(func(d *Dao) {
  21. _, err := d.RecheckStateMap(context.Background(), 1, []int64{10098814})
  22. So(err, ShouldBeNil)
  23. }))
  24. }
  25. func Test_TxUpRecheckState(t *testing.T) {
  26. var c = context.Background()
  27. Convey("TxUpRecheckState", t, WithDao(func(d *Dao) {
  28. tx, _ := d.BeginTran(c)
  29. err := d.TxUpRecheckState(tx, 0, 0, 0)
  30. So(err, ShouldBeNil)
  31. tx.Commit()
  32. }))
  33. }