summaryrefslogtreecommitdiffstats
path: root/integrations/download_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-02-12 15:09:43 +0000
committerGitHub <noreply@github.com>2019-02-12 15:09:43 +0000
commit2a03e96bceadfcc5e18bd61e755980ee72dcdb15 (patch)
tree2ecc1848c76fe458f10dffe568a8bb0cdc0f32ee /integrations/download_test.go
parent296814e887f9bcf0b1d44552deaf40e89e08ab50 (diff)
downloadgitea-2a03e96bceadfcc5e18bd61e755980ee72dcdb15.tar.gz
gitea-2a03e96bceadfcc5e18bd61e755980ee72dcdb15.zip
Allow markdown files to read from the LFS (#5787)
This PR makes it possible for the markdown renderer to render images and media straight from the LFS. Fix #5746 Signed-off-by: Andrew Thornton [art27@cantab.net](mailto:art27@cantab.net)
Diffstat (limited to 'integrations/download_test.go')
-rw-r--r--integrations/download_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/integrations/download_test.go b/integrations/download_test.go
index 0d5fef6bab..3fd858887e 100644
--- a/integrations/download_test.go
+++ b/integrations/download_test.go
@@ -22,3 +22,15 @@ func TestDownloadByID(t *testing.T) {
assert.Equal(t, "# repo1\n\nDescription for repo1", resp.Body.String())
}
+
+func TestDownloadByIDMedia(t *testing.T) {
+ prepareTestEnv(t)
+
+ session := loginUser(t, "user2")
+
+ // Request raw blob
+ req := NewRequest(t, "GET", "/user2/repo1/media/blob/4b4851ad51df6a7d9f25c979345979eaeb5b349f")
+ resp := session.MakeRequest(t, req, http.StatusOK)
+
+ assert.Equal(t, "# repo1\n\nDescription for repo1", resp.Body.String())
+}