MM-31063: Change constants to use CamelCase (#16608)
* MM-31063: Change constants to use CamelCase * store package * change allcaps to camel case (#16615) * New tools.mod Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
8b6ac5f5d2
Коммит
c1dd23a3c8
@@ -194,7 +194,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
t.Run("CreateWithTokenHappyPath", func(t *testing.T) {
|
||||
user := model.User{Email: th.GenerateTestEmail(), Nickname: "Corey Hulen", Password: "hello1", Username: GenerateTestUsername(), Roles: model.SYSTEM_ADMIN_ROLE_ID + " " + model.SYSTEM_USER_ROLE_ID}
|
||||
token := model.NewToken(
|
||||
app.TOKEN_TYPE_TEAM_INVITATION,
|
||||
app.TokenTypeTeamInvitation,
|
||||
model.MapToJson(map[string]string{"teamId": th.BasicTeam.Id, "email": user.Email}),
|
||||
)
|
||||
require.Nil(t, th.App.Srv().Store.Token().Save(token))
|
||||
@@ -219,7 +219,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
th.TestForSystemAdminAndLocal(t, func(t *testing.T, client *model.Client4) {
|
||||
user := model.User{Email: th.GenerateTestEmail(), Nickname: "Corey Hulen", Password: "hello1", Username: GenerateTestUsername(), Roles: model.SYSTEM_ADMIN_ROLE_ID + " " + model.SYSTEM_USER_ROLE_ID}
|
||||
token := model.NewToken(
|
||||
app.TOKEN_TYPE_TEAM_INVITATION,
|
||||
app.TokenTypeTeamInvitation,
|
||||
model.MapToJson(map[string]string{"teamId": th.BasicTeam.Id, "email": user.Email}),
|
||||
)
|
||||
require.Nil(t, th.App.Srv().Store.Token().Save(token))
|
||||
@@ -244,7 +244,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
t.Run("NoToken", func(t *testing.T) {
|
||||
user := model.User{Email: th.GenerateTestEmail(), Nickname: "Corey Hulen", Password: "hello1", Username: GenerateTestUsername(), Roles: model.SYSTEM_ADMIN_ROLE_ID + " " + model.SYSTEM_USER_ROLE_ID}
|
||||
token := model.NewToken(
|
||||
app.TOKEN_TYPE_TEAM_INVITATION,
|
||||
app.TokenTypeTeamInvitation,
|
||||
model.MapToJson(map[string]string{"teamId": th.BasicTeam.Id, "email": user.Email}),
|
||||
)
|
||||
require.Nil(t, th.App.Srv().Store.Token().Save(token))
|
||||
@@ -260,7 +260,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
timeNow := time.Now()
|
||||
past49Hours := timeNow.Add(-49*time.Hour).UnixNano() / int64(time.Millisecond)
|
||||
token := model.NewToken(
|
||||
app.TOKEN_TYPE_TEAM_INVITATION,
|
||||
app.TokenTypeTeamInvitation,
|
||||
model.MapToJson(map[string]string{"teamId": th.BasicTeam.Id, "email": user.Email}),
|
||||
)
|
||||
token.CreateAt = past49Hours
|
||||
@@ -290,7 +290,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
user := model.User{Email: th.GenerateTestEmail(), Nickname: "Corey Hulen", Password: "hello1", Username: GenerateTestUsername(), Roles: model.SYSTEM_ADMIN_ROLE_ID + " " + model.SYSTEM_USER_ROLE_ID}
|
||||
|
||||
token := model.NewToken(
|
||||
app.TOKEN_TYPE_TEAM_INVITATION,
|
||||
app.TokenTypeTeamInvitation,
|
||||
model.MapToJson(map[string]string{"teamId": th.BasicTeam.Id, "email": user.Email}),
|
||||
)
|
||||
require.Nil(t, th.App.Srv().Store.Token().Save(token))
|
||||
@@ -310,7 +310,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
user := model.User{Email: th.GenerateTestEmail(), Nickname: "Corey Hulen", Password: "hello1", Username: GenerateTestUsername(), Roles: model.SYSTEM_ADMIN_ROLE_ID + " " + model.SYSTEM_USER_ROLE_ID}
|
||||
|
||||
token := model.NewToken(
|
||||
app.TOKEN_TYPE_TEAM_INVITATION,
|
||||
app.TokenTypeTeamInvitation,
|
||||
model.MapToJson(map[string]string{"teamId": th.BasicTeam.Id, "email": user.Email}),
|
||||
)
|
||||
require.Nil(t, th.App.Srv().Store.Token().Save(token))
|
||||
@@ -327,7 +327,7 @@ func TestCreateUserWithToken(t *testing.T) {
|
||||
user := model.User{Email: th.GenerateTestEmail(), Nickname: "Corey Hulen", Password: "hello1", Username: GenerateTestUsername(), Roles: model.SYSTEM_ADMIN_ROLE_ID + " " + model.SYSTEM_USER_ROLE_ID}
|
||||
|
||||
token := model.NewToken(
|
||||
app.TOKEN_TYPE_TEAM_INVITATION,
|
||||
app.TokenTypeTeamInvitation,
|
||||
model.MapToJson(map[string]string{"teamId": th.BasicTeam.Id, "email": user.Email}),
|
||||
)
|
||||
require.Nil(t, th.App.Srv().Store.Token().Save(token))
|
||||
|
||||
Ссылка в новой задаче
Block a user