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.
32 lines
601 B
32 lines
601 B
package service |
|
|
|
import ( |
|
"context" |
|
"testing" |
|
|
|
. "github.com/smartystreets/goconvey/convey" |
|
) |
|
|
|
var ( |
|
bid = "account" |
|
token = "5049a45ffc7c49489c14a7677c4548e2" |
|
) |
|
|
|
func TestToken(t *testing.T) { |
|
var ( |
|
c = context.Background() |
|
) |
|
Convey("err should return nil", t, func() { |
|
_, t, err := svr.Token(c, bid) |
|
So(err, ShouldBeNil) |
|
So(t, ShouldNotBeNil) |
|
}) |
|
Convey("err should return nil", t, func() { |
|
err := svr.VerifyCaptcha(c, token, "test") |
|
So(err, ShouldNotBeNil) |
|
}) |
|
Convey("err should return nil", t, func() { |
|
business := svr.LookUp(bid) |
|
So(business, ShouldNotBeEmpty) |
|
}) |
|
}
|
|
|