mc_test.go 556 B

12345678910111213141516171819202122232425262728
  1. package dao
  2. import (
  3. "context"
  4. "testing"
  5. "go-common/library/net/http/blademaster/middleware/permit"
  6. "github.com/smartystreets/goconvey/convey"
  7. )
  8. func TestSession(t *testing.T) {
  9. convey.Convey("Session", t, func() {
  10. sid := "1234567890"
  11. _, err := d.Session(context.Background(), sid)
  12. convey.So(err, convey.ShouldBeNil)
  13. })
  14. }
  15. func TestSetSession(t *testing.T) {
  16. convey.Convey("SetSession", t, func() {
  17. p := &permit.Session{
  18. Sid: "1234567890",
  19. }
  20. err := d.SetSession(context.Background(), p)
  21. convey.So(err, convey.ShouldBeNil)
  22. })
  23. }