config_test.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 TestFansConf(t *testing.T) {
  9. Convey("test archive", t, WithDao(func(d *Dao) {
  10. fans, err := d.FansConf(context.Background())
  11. So(err, ShouldBeNil)
  12. So(fans, ShouldNotBeNil)
  13. }))
  14. }
  15. func TestDao_RoundTypeConf(t *testing.T) {
  16. Convey("test archive", t, WithDao(func(d *Dao) {
  17. r, err := d.RoundTypeConf(context.Background())
  18. So(err, ShouldBeNil)
  19. So(r, ShouldNotBeNil)
  20. }))
  21. }
  22. func TestDao_ThresholdConf(t *testing.T) {
  23. Convey("test archive", t, WithDao(func(d *Dao) {
  24. r, err := d.ThresholdConf(context.Background())
  25. So(err, ShouldBeNil)
  26. So(r, ShouldNotBeNil)
  27. }))
  28. }
  29. func TestDao_AuditTypesConf(t *testing.T) {
  30. Convey("test archive", t, WithDao(func(d *Dao) {
  31. r, err := d.AuditTypesConf(context.Background())
  32. So(err, ShouldBeNil)
  33. So(r, ShouldNotBeNil)
  34. }))
  35. }
  36. func TestDao_WeightVC(t *testing.T) {
  37. Convey("test archive", t, WithDao(func(d *Dao) {
  38. r, err := d.WeightVC(context.Background())
  39. So(err, ShouldBeNil)
  40. So(r, ShouldNotBeNil)
  41. }))
  42. }
  43. func TestDao_SetWeightVC(t *testing.T) {
  44. Convey("SetWeightVC", t, WithDao(func(d *Dao) {
  45. _, err := d.SetWeightVC(context.TODO(), &archive.WeightVC{}, "desc")
  46. So(err, ShouldBeNil)
  47. }))
  48. }
  49. func TestDao_InWeightVC(t *testing.T) {
  50. Convey("InWeightVC", t, WithDao(func(d *Dao) {
  51. _, err := d.InWeightVC(context.TODO(), &archive.WeightVC{}, "desc")
  52. So(err, ShouldBeNil)
  53. }))
  54. }