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
Этот коммит содержится в:
@@ -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)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user