bangumi_test.go 533 B

123456789101112131415161718192021222324252627
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_LoadAllBangumi(t *testing.T) {
  8. Convey("LoadAllBangumi", t, func() {
  9. etam, err := d.LoadAllBangumi(context.TODO())
  10. So(err, ShouldBeNil)
  11. So(etam, ShouldNotBeNil)
  12. for epid, aid := range etam {
  13. Printf("epid:%d,aid:%d\n", epid, aid)
  14. }
  15. })
  16. }
  17. func Test_IsLegal(t *testing.T) {
  18. Convey("IsLegal", t, func() {
  19. isLegal, err := d.IsLegal(context.TODO(), 11696747, 157927, 1)
  20. So(err, ShouldBeNil)
  21. Println(isLegal)
  22. })
  23. }