Fixed some ineffective assignments (#12543)

Этот коммит содержится в:
Agniva De Sarker
2019-10-03 18:15:27 +05:30
коммит произвёл Eli Yukelzon
родитель eebe1fc290
Коммит 20ff7032a6
16 изменённых файлов: 35 добавлений и 11 удалений

Просмотреть файл

@@ -2931,6 +2931,7 @@ func TestGetChannelMembersTimezones(t *testing.T) {
user.Timezone["manualTimezone"] = ""
_, resp = Client.UpdateUser(user)
CheckNoError(t, resp)
timezone, resp = Client.GetChannelMembersTimezones(th.BasicChannel.Id)
CheckNoError(t, resp)

Просмотреть файл

@@ -14,6 +14,7 @@ import (
"github.com/mattermost/mattermost-server/utils"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestCreateEmoji(t *testing.T) {
@@ -238,10 +239,8 @@ func TestGetEmojiList(t *testing.T) {
found = true
break
}
if found {
t.Fatalf("should not get a deleted emoji %v", emojis[0].Id)
}
}
require.Falsef(t, found, "should not get a deleted emoji %v", emojis[0].Id)
listEmoji, resp = Client.GetEmojiList(0, 1)
CheckNoError(t, resp)

Просмотреть файл

@@ -1379,6 +1379,7 @@ func TestGetUsersByGroupChannelIds(t *testing.T) {
th.LoginBasic2()
usersByChannelId, resp = th.Client.GetUsersByGroupChannelIds([]string{gc1.Id})
CheckNoError(t, resp)
_, ok := usersByChannelId[gc1.Id]
require.False(t, ok)
@@ -4425,6 +4426,7 @@ func TestRegisterTermsOfServiceAction(t *testing.T) {
success, resp := th.Client.RegisterTermsOfServiceAction(th.BasicUser.Id, "st_1", true)
CheckErrorMessage(t, resp, "store.sql_terms_of_service_store.get.no_rows.app_error")
assert.Nil(t, success)
termsOfService, err := th.App.CreateTermsOfService("terms of service", th.BasicUser.Id)
if err != nil {