Этот коммит содержится в:
Ben Schumacher
2019-10-29 07:45:09 +01:00
коммит произвёл GitHub
родитель d7649fbf31
Коммит 7a665aacdd
16 изменённых файлов: 33 добавлений и 47 удалений

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

@@ -607,8 +607,7 @@ func TestUploadFiles(t *testing.T) {
expected, err := ioutil.ReadFile(filepath.Join(testDir, name))
require.Nil(t, err)
if bytes.Compare(data, expected) != 0 {
if !bytes.Equal(data, expected) {
tf, err := ioutil.TempFile("", fmt.Sprintf("test_%v_*_%s", i, name))
require.Nil(t, err)
_, _ = io.Copy(tf, bytes.NewReader(data))

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

@@ -397,7 +397,6 @@ func getRedirectLocation(c *Context, w http.ResponseWriter, r *http.Request) {
m["location"] = location
w.Write([]byte(model.MapToJson(m)))
return
}
func pushNotificationAck(c *Context, w http.ResponseWriter, r *http.Request) {
@@ -415,5 +414,4 @@ func pushNotificationAck(c *Context, w http.ResponseWriter, r *http.Request) {
}
ReturnStatusOK(w)
return
}

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

@@ -1369,7 +1369,8 @@ func TestGetUsersByGroupChannelIds(t *testing.T) {
usersByChannelId, resp := th.Client.GetUsersByGroupChannelIds([]string{gc1.Id})
CheckNoError(t, resp)
users, _ := usersByChannelId[gc1.Id]
users, ok := usersByChannelId[gc1.Id]
assert.True(t, ok)
userIds := []string{}
for _, user := range users {
userIds = append(userIds, user.Id)
@@ -1381,7 +1382,7 @@ func TestGetUsersByGroupChannelIds(t *testing.T) {
usersByChannelId, resp = th.Client.GetUsersByGroupChannelIds([]string{gc1.Id})
CheckNoError(t, resp)
_, ok := usersByChannelId[gc1.Id]
_, ok = usersByChannelId[gc1.Id]
require.False(t, ok)
th.Client.Logout()