MM-16872 - Extend Plugin API to set LHS bot icon (#11601)

* MM-16872 - Extend Plugin API to set LHS bot icon

* MM-16872 - Using ReadSeeker as opposed to Reader for reading svg image file

* MM-16872 - PR feedback

* MM-16872 - Using userId rather than bot.UserId

* MM-16872 - Minor stylistic changes

* MM-16872 - Removing DriverName check
Этот коммит содержится в:
Ali Farooq
2019-07-11 12:00:12 -04:00
коммит произвёл GitHub
родитель 76f4fccf8a
Коммит 5ed40a48c8
10 изменённых файлов: 388 добавлений и 57 удалений

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

@@ -1155,7 +1155,13 @@ func TestSetBotIconImage(t *testing.T) {
_, resp = th.SystemAdminClient.SetBotIconImage(bot.UserId, goodData)
CheckNoError(t, resp)
info := &model.FileInfo{Path: "/bots/" + bot.UserId + "/icon.svg"}
fpath := fmt.Sprintf("/bots/%v/icon.svg", bot.UserId)
actualData, err := th.App.ReadFile(fpath)
require.Nil(t, err)
require.NotNil(t, actualData)
require.Equal(t, goodData, actualData)
info := &model.FileInfo{Path: fpath}
err = th.cleanupTestFile(info)
require.Nil(t, err)
}