permit_test.go 523 B

123456789101112131415161718192021222324252627
  1. package dao
  2. import (
  3. "context"
  4. "go-common/library/ecode"
  5. "testing"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestVerifyDsb(t *testing.T) {
  9. convey.Convey("VerifyDsb", t, func() {
  10. sid := "1234567890"
  11. _, err := d.VerifyDsb(context.Background(), sid)
  12. if err == ecode.NoLogin {
  13. err = nil
  14. }
  15. convey.So(err, convey.ShouldBeNil)
  16. })
  17. }
  18. func TestNewSession(t *testing.T) {
  19. convey.Convey("NewSession", t, func() {
  20. res := d.NewSession(context.Background())
  21. convey.So(res, convey.ShouldNotBeNil)
  22. })
  23. }