[MM-16751] golint model (#17896)
Этот коммит содержится в:
коммит произвёл
Claudio Costa
родитель
953eebdef4
Коммит
97ccf0bdf6
@@ -134,7 +134,7 @@ func TestIncomingWebhook(t *testing.T) {
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly = true })
|
||||
|
||||
// Read only default channel should fail.
|
||||
resp, err := http.Post(url, "application/json", strings.NewReader(fmt.Sprintf("{\"text\":\"this is a test\", \"channel\":\"%s\"}", model.DEFAULT_CHANNEL)))
|
||||
resp, err := http.Post(url, "application/json", strings.NewReader(fmt.Sprintf("{\"text\":\"this is a test\", \"channel\":\"%s\"}", model.DefaultChannelName)))
|
||||
require.NoError(t, err)
|
||||
assert.True(t, resp.StatusCode != http.StatusOK)
|
||||
|
||||
@@ -148,7 +148,7 @@ func TestIncomingWebhook(t *testing.T) {
|
||||
require.Nil(t, appErr)
|
||||
adminUrl := ApiClient.Url + "/hooks/" + adminHook.Id
|
||||
|
||||
resp, err = http.Post(adminUrl, "application/json", strings.NewReader(fmt.Sprintf("{\"text\":\"this is a test\", \"channel\":\"%s\"}", model.DEFAULT_CHANNEL)))
|
||||
resp, err = http.Post(adminUrl, "application/json", strings.NewReader(fmt.Sprintf("{\"text\":\"this is a test\", \"channel\":\"%s\"}", model.DefaultChannelName)))
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
|
||||
@@ -232,7 +232,7 @@ func TestIncomingWebhook(t *testing.T) {
|
||||
})
|
||||
|
||||
t.Run("ChannelLockedWebhook", func(t *testing.T) {
|
||||
channel, err := th.App.CreateChannel(th.Context, &model.Channel{TeamId: th.BasicTeam.Id, Name: model.NewId(), DisplayName: model.NewId(), Type: model.CHANNEL_OPEN, CreatorId: th.BasicUser.Id}, true)
|
||||
channel, err := th.App.CreateChannel(th.Context, &model.Channel{TeamId: th.BasicTeam.Id, Name: model.NewId(), DisplayName: model.NewId(), Type: model.ChannelTypeOpen, CreatorId: th.BasicUser.Id}, true)
|
||||
require.Nil(t, err)
|
||||
|
||||
hook, err := th.App.CreateIncomingWebhookForChannel(th.BasicUser.Id, th.BasicChannel, &model.IncomingWebhook{ChannelId: th.BasicChannel.Id, ChannelLocked: true})
|
||||
@@ -271,7 +271,7 @@ func TestCommandWebhooks(t *testing.T) {
|
||||
CreatorId: th.BasicUser.Id,
|
||||
TeamId: th.BasicTeam.Id,
|
||||
URL: "http://nowhere.com",
|
||||
Method: model.COMMAND_METHOD_POST,
|
||||
Method: model.CommandMethodPost,
|
||||
Trigger: "delayed"})
|
||||
require.Nil(t, appErr)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user