From ecfba2c2e9e46389e2012e9adf1ab993aaa7ea5e Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Wed, 1 Aug 2018 11:43:58 -0400 Subject: MM-11175 Add logic to server to understand markdown images with dimensions (#9159) --- app/post_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/post_test.go') diff --git a/app/post_test.go b/app/post_test.go index 186f960d5..482197833 100644 --- a/app/post_test.go +++ b/app/post_test.go @@ -295,6 +295,14 @@ func TestImageProxy(t *testing.T) { assert.Equal(t, "![foo]("+tc.ImageURL+")", th.App.PostWithProxyRemovedFromImageURLs(post).Message) post.Message = "![foo](" + tc.ProxiedImageURL + ")" assert.Equal(t, "![foo]("+tc.ImageURL+")", th.App.PostWithProxyRemovedFromImageURLs(post).Message) + + if tc.ImageURL != "" { + post.Message = "![foo](" + tc.ImageURL + " =500x200)" + assert.Equal(t, "![foo]("+tc.ProxiedImageURL+" =500x200)", th.App.PostWithProxyAddedToImageURLs(post).Message) + assert.Equal(t, "![foo]("+tc.ImageURL+" =500x200)", th.App.PostWithProxyRemovedFromImageURLs(post).Message) + post.Message = "![foo](" + tc.ProxiedImageURL + " =500x200)" + assert.Equal(t, "![foo]("+tc.ImageURL+" =500x200)", th.App.PostWithProxyRemovedFromImageURLs(post).Message) + } }) } } -- cgit v1.2.3-1-g7c22