question_bank_bind_test.go 930 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func TestGetBankBind(t *testing.T) {
  8. Convey("TestGetBankBind: ", t, func() {
  9. res, err := d.GetBankBind(context.TODO(), 1, 1, []string{"1111"}, true)
  10. So(err, ShouldBeNil)
  11. So(res, ShouldNotBeNil)
  12. })
  13. }
  14. func TestGetBindBank(t *testing.T) {
  15. Convey("TestGetBindBank: ", t, func() {
  16. res, err := d.GetBindBank(context.TODO(), 1, 1, []string{"1111"})
  17. So(err, ShouldBeNil)
  18. So(res, ShouldNotBeNil)
  19. })
  20. }
  21. func TestCountBindItem(t *testing.T) {
  22. Convey("TestCountBindItem: ", t, func() {
  23. res, err := d.CountBindItem(context.TODO(), _qbid)
  24. So(err, ShouldBeNil)
  25. So(res, ShouldNotBeNil)
  26. })
  27. }
  28. func TestGetBindItem(t *testing.T) {
  29. Convey("TestCountBindItem: ", t, func() {
  30. res, cnt, err := d.GetBindItem(context.TODO(), _qbid, _page, _pagesize)
  31. So(err, ShouldBeNil)
  32. So(cnt, ShouldNotBeNil)
  33. So(res, ShouldNotBeNil)
  34. })
  35. }