spelling: strings (#19542)
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -648,7 +648,7 @@ func (th *TestHelper) SetupSamlConfig() {
|
||||
*cfg.SamlSettings.Enable = true
|
||||
*cfg.SamlSettings.Verify = false
|
||||
*cfg.SamlSettings.Encrypt = false
|
||||
*cfg.SamlSettings.IdpURL = "https://does.notmatter.com"
|
||||
*cfg.SamlSettings.IdpURL = "https://does.notmatter.example"
|
||||
*cfg.SamlSettings.IdpDescriptorURL = "https://localhost/adfs/services/trust"
|
||||
*cfg.SamlSettings.AssertionConsumerServiceURL = "https://localhost/login/sso/saml"
|
||||
*cfg.SamlSettings.ServiceProviderIdentifier = "https://localhost/login/sso/saml"
|
||||
|
||||
@@ -691,7 +691,7 @@ func TestGetBots(t *testing.T) {
|
||||
th.LoginBasic2()
|
||||
orphanedBot, resp, err := th.Client.CreateBot(&model.Bot{
|
||||
Username: GenerateTestUsername(),
|
||||
Description: "an oprphaned bot",
|
||||
Description: "an orphaned bot",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
CheckCreatedStatus(t, resp)
|
||||
|
||||
@@ -2504,7 +2504,7 @@ func TestGetChannelStats(t *testing.T) {
|
||||
stats, _, err := client.GetChannelStats(channel.Id, "")
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, channel.Id, stats.ChannelId, "couldnt't get extra info")
|
||||
require.Equal(t, channel.Id, stats.ChannelId, "couldn't get extra info")
|
||||
require.Equal(t, int64(1), stats.MemberCount, "got incorrect member count")
|
||||
require.Equal(t, int64(0), stats.PinnedPostCount, "got incorrect pinned post count")
|
||||
|
||||
|
||||
@@ -531,7 +531,7 @@ func TestGetEmojiImage(t *testing.T) {
|
||||
require.Greater(t, len(emojiImage), 0, "no image returned")
|
||||
|
||||
_, imageType, err = image.DecodeConfig(bytes.NewReader(emojiImage))
|
||||
require.NoError(t, err, "unable to indentify received image")
|
||||
require.NoError(t, err, "unable to identify received image")
|
||||
require.Equal(t, imageType, "gif", "expected gif")
|
||||
|
||||
emoji3 := &model.Emoji{
|
||||
@@ -546,7 +546,7 @@ func TestGetEmojiImage(t *testing.T) {
|
||||
require.Greater(t, len(emojiImage), 0, "no image returned")
|
||||
|
||||
_, imageType, err = image.DecodeConfig(bytes.NewReader(emojiImage))
|
||||
require.NoError(t, err, "unable to indentify received image")
|
||||
require.NoError(t, err, "unable to identify received image")
|
||||
require.Equal(t, imageType, "jpeg", "expected jpeg")
|
||||
|
||||
emoji4 := &model.Emoji{
|
||||
@@ -561,7 +561,7 @@ func TestGetEmojiImage(t *testing.T) {
|
||||
require.Greater(t, len(emojiImage), 0, "no image returned")
|
||||
|
||||
_, imageType, err = image.DecodeConfig(bytes.NewReader(emojiImage))
|
||||
require.NoError(t, err, "unable to idenitify received image")
|
||||
require.NoError(t, err, "unable to identify received image")
|
||||
require.Equal(t, imageType, "png", "expected png")
|
||||
|
||||
_, err = client.DeleteEmoji(emoji4.Id)
|
||||
|
||||
@@ -55,7 +55,7 @@ func TestPostActionCookies(t *testing.T) {
|
||||
|
||||
for name, test := range map[string]struct {
|
||||
Action model.PostAction
|
||||
ExpectedSucess bool
|
||||
ExpectedSuccess bool
|
||||
ExpectedStatusCode int
|
||||
}{
|
||||
"32 character ID": {
|
||||
@@ -70,7 +70,7 @@ func TestPostActionCookies(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ExpectedSucess: true,
|
||||
ExpectedSuccess: true,
|
||||
ExpectedStatusCode: http.StatusOK,
|
||||
},
|
||||
"6 character ID": {
|
||||
@@ -85,7 +85,7 @@ func TestPostActionCookies(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ExpectedSucess: true,
|
||||
ExpectedSuccess: true,
|
||||
ExpectedStatusCode: http.StatusOK,
|
||||
},
|
||||
"Empty ID": {
|
||||
@@ -100,7 +100,7 @@ func TestPostActionCookies(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
ExpectedSucess: false,
|
||||
ExpectedSuccess: false,
|
||||
ExpectedStatusCode: http.StatusNotFound,
|
||||
},
|
||||
} {
|
||||
@@ -130,7 +130,7 @@ func TestPostActionCookies(t *testing.T) {
|
||||
|
||||
resp, err := client.DoPostActionWithCookie(post.Id, test.Action.Id, "", test.Action.Cookie)
|
||||
require.NotNil(t, resp)
|
||||
if test.ExpectedSucess {
|
||||
if test.ExpectedSuccess {
|
||||
assert.NoError(t, err)
|
||||
} else {
|
||||
assert.Error(t, err)
|
||||
|
||||
@@ -3466,7 +3466,7 @@ func TestSetDefaultProfileImage(t *testing.T) {
|
||||
|
||||
ruser, appErr := th.App.GetUser(user.Id)
|
||||
require.Nil(t, appErr)
|
||||
assert.Equal(t, int64(0), ruser.LastPictureUpdate, "Picture should have resetted to default")
|
||||
assert.Equal(t, int64(0), ruser.LastPictureUpdate, "Picture should have reset to default")
|
||||
|
||||
info := &model.FileInfo{Path: "users/" + user.Id + "/profile.png"}
|
||||
err = th.cleanupTestFile(info)
|
||||
@@ -5269,7 +5269,7 @@ func TestPromoteGuestToUser(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
defer require.Nil(t, th.App.DemoteUserToGuest(user))
|
||||
}, "promete a guest to user")
|
||||
}, "promote a guest to user")
|
||||
|
||||
t.Run("websocket update user event", func(t *testing.T) {
|
||||
webSocketClient, err := th.CreateWebSocketClient()
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/mattermost/mattermost-server/v6/model"
|
||||
)
|
||||
|
||||
func TestAPIResctrictedViewMembers(t *testing.T) {
|
||||
func TestAPIRestrictedViewMembers(t *testing.T) {
|
||||
th := Setup(t)
|
||||
defer th.TearDown()
|
||||
|
||||
|
||||
@@ -331,7 +331,7 @@ func TestGetIncomingWebhook(t *testing.T) {
|
||||
CheckBadRequestStatus(t, resp)
|
||||
}, "WhenInvalidHookID")
|
||||
|
||||
t.Run("WhenUserDoesNotHavePemissions", func(t *testing.T) {
|
||||
t.Run("WhenUserDoesNotHavePermissions", func(t *testing.T) {
|
||||
th.LoginBasic()
|
||||
_, resp, err := th.Client.GetIncomingWebhook(rhook.Id, "")
|
||||
require.Error(t, err)
|
||||
@@ -378,7 +378,7 @@ func TestDeleteIncomingWebhook(t *testing.T) {
|
||||
CheckNotFoundStatus(t, resp)
|
||||
}, "WhenHookExists")
|
||||
|
||||
t.Run("WhenUserDoesNotHavePemissions", func(t *testing.T) {
|
||||
t.Run("WhenUserDoesNotHavePermissions", func(t *testing.T) {
|
||||
hook := &model.IncomingWebhook{ChannelId: th.BasicChannel.Id}
|
||||
rhook, _, err := th.SystemAdminClient.CreateIncomingWebhook(hook)
|
||||
require.NoError(t, err)
|
||||
@@ -1264,7 +1264,7 @@ func TestDeleteOutgoingHook(t *testing.T) {
|
||||
CheckNotFoundStatus(t, resp)
|
||||
}, "WhenHookExists")
|
||||
|
||||
t.Run("WhenUserDoesNotHavePemissions", func(t *testing.T) {
|
||||
t.Run("WhenUserDoesNotHavePermissions", func(t *testing.T) {
|
||||
hook := &model.OutgoingWebhook{ChannelId: th.BasicChannel.Id, TeamId: th.BasicChannel.TeamId,
|
||||
CallbackURLs: []string{"http://nowhere.com"}, TriggerWords: []string{"dogs"}}
|
||||
rhook, _, err := th.SystemAdminClient.CreateOutgoingWebhook(hook)
|
||||
|
||||
Ссылка в новой задаче
Block a user