MM-13923 Fixing pulling from incorect cache. (#10216)

* Fixing pulling from incorect cache.

* Adding caching test.
Этот коммит содержится в:
Christopher Speller
2019-02-01 08:13:51 -08:00
коммит произвёл GitHub
родитель 0f35c4b24d
Коммит 4e0840969b
2 изменённых файлов: 6 добавлений и 1 удалений

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

@@ -771,6 +771,11 @@ func TestRedirectLocation(t *testing.T) {
CheckNoError(t, resp)
assert.Equal(t, expected, actual)
// Check cached value
actual, resp = th.SystemAdminClient.GetRedirectLocation(mockBitlyLink, "")
CheckNoError(t, resp)
assert.Equal(t, expected, actual)
*th.App.Config().ServiceSettings.EnableLinkPreviews = false
actual, resp = th.SystemAdminClient.GetRedirectLocation("https://mattermost.com/", "")
CheckNoError(t, resp)