feat: align ids to int64
This commit is contained in:
@@ -12,7 +12,6 @@ import (
|
||||
"quyun/v2/pkg/consts"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/spf13/cast"
|
||||
"github.com/stretchr/testify/suite"
|
||||
"go.ipao.vip/atom/contracts"
|
||||
"go.uber.org/dig"
|
||||
@@ -81,7 +80,7 @@ func (s *UserTestSuite) Test_Me() {
|
||||
// Create user
|
||||
phone := "13800138003"
|
||||
resp, _ := User.LoginWithOTP(ctx, phone, "123456")
|
||||
userID := cast.ToInt64(resp.User.ID)
|
||||
userID := resp.User.ID
|
||||
|
||||
Convey("should return user profile", func() {
|
||||
// Mock context with user ID
|
||||
@@ -109,7 +108,7 @@ func (s *UserTestSuite) Test_Update() {
|
||||
|
||||
phone := "13800138004"
|
||||
resp, _ := User.LoginWithOTP(ctx, phone, "123456")
|
||||
userID := cast.ToInt64(resp.User.ID)
|
||||
userID := resp.User.ID
|
||||
ctx = context.WithValue(ctx, consts.CtxKeyUser, userID)
|
||||
|
||||
Convey("should update nickname and bio", func() {
|
||||
@@ -137,7 +136,7 @@ func (s *UserTestSuite) Test_RealName() {
|
||||
|
||||
phone := "13800138005"
|
||||
resp, _ := User.LoginWithOTP(ctx, phone, "123456")
|
||||
userID := cast.ToInt64(resp.User.ID)
|
||||
userID := resp.User.ID
|
||||
ctx = context.WithValue(ctx, consts.CtxKeyUser, userID)
|
||||
|
||||
Convey("should update realname status", func() {
|
||||
@@ -162,7 +161,7 @@ func (s *UserTestSuite) Test_GetNotifications() {
|
||||
|
||||
phone := "13800138006"
|
||||
resp, _ := User.LoginWithOTP(ctx, phone, "123456")
|
||||
userID := cast.ToInt64(resp.User.ID)
|
||||
userID := resp.User.ID
|
||||
ctx = context.WithValue(ctx, consts.CtxKeyUser, userID)
|
||||
|
||||
// Mock notifications
|
||||
|
||||
Reference in New Issue
Block a user