You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
836 B
36 lines
836 B
package dao |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
|
|
"github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
func TestDaoAccessCookie(t *testing.T) { |
|
var ( |
|
c = context.Background() |
|
cookie = "cookie=cookie" |
|
) |
|
convey.Convey("AccessCookie", t, func(ctx convey.C) { |
|
res, err := d.AccessCookie(c, cookie) |
|
ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) { |
|
ctx.So(err, convey.ShouldNotBeNil) |
|
ctx.So(res, convey.ShouldBeNil) |
|
}) |
|
}) |
|
} |
|
|
|
func TestDaoAccessToken(t *testing.T) { |
|
var ( |
|
c = context.Background() |
|
accesskey = "123456" |
|
) |
|
convey.Convey("AccessToken", t, func(ctx convey.C) { |
|
res, err := d.AccessToken(c, accesskey) |
|
ctx.Convey("Then err should be nil.res should not be nil.", func(ctx convey.C) { |
|
ctx.So(err, convey.ShouldNotBeNil) |
|
ctx.So(res, convey.ShouldBeNil) |
|
}) |
|
}) |
|
}
|
|
|