user_test.go 350 B

12345678910111213141516
  1. package service
  2. import (
  3. "context"
  4. "testing"
  5. . "github.com/smartystreets/goconvey/convey"
  6. )
  7. func Test_QueryUserInfo(t *testing.T) {
  8. Convey("query user when user exists", t, func() {
  9. userInfo, err := s.QueryUserInfo(context.Background(), "fengyifeng")
  10. So(err, ShouldBeNil)
  11. So(userInfo.EMail, ShouldEqual, "fengyifeng@bilibili.com")
  12. })
  13. }