MM-13492 Allow empty channel in /channels/view (#10062)

* Allow empty channel in /channels/view

* Simplify if statement.
Этот коммит содержится в:
Christopher Speller
2019-01-07 14:07:41 -08:00
коммит произвёл GitHub
родитель dc175cc704
Коммит ca4dcf4404
2 изменённых файлов: 18 добавлений и 1 удалений

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

@@ -1418,6 +1418,12 @@ func TestViewChannel(t *testing.T) {
_, resp = Client.ViewChannel(th.BasicUser.Id, view)
CheckBadRequestStatus(t, resp)
// All blank is OK we use it for clicking off of the browser.
view.PrevChannelId = ""
view.ChannelId = ""
_, resp = Client.ViewChannel(th.BasicUser.Id, view)
CheckNoError(t, resp)
view.PrevChannelId = ""
view.ChannelId = "junk"
_, resp = Client.ViewChannel(th.BasicUser.Id, view)