mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 02:08:36 +00:00
Use lfs label for lfs file rather than a long description (#34363)
Before  After 
This commit is contained in:
@@ -38,7 +38,7 @@ func TestLFSRender(t *testing.T) {
|
||||
doc := NewHTMLParser(t, resp.Body).doc
|
||||
|
||||
fileInfo := doc.Find("div.file-info-entry").First().Text()
|
||||
assert.Contains(t, fileInfo, "Stored with Git LFS")
|
||||
assert.Contains(t, fileInfo, "LFS")
|
||||
|
||||
content := doc.Find("div.file-view").Text()
|
||||
assert.Contains(t, content, "Testing documents in LFS")
|
||||
@@ -54,7 +54,7 @@ func TestLFSRender(t *testing.T) {
|
||||
doc := NewHTMLParser(t, resp.Body).doc
|
||||
|
||||
fileInfo := doc.Find("div.file-info-entry").First().Text()
|
||||
assert.Contains(t, fileInfo, "Stored with Git LFS")
|
||||
assert.Contains(t, fileInfo, "LFS")
|
||||
|
||||
src, exists := doc.Find(".file-view img").Attr("src")
|
||||
assert.True(t, exists, "The image should be in an <img> tag")
|
||||
@@ -71,7 +71,7 @@ func TestLFSRender(t *testing.T) {
|
||||
doc := NewHTMLParser(t, resp.Body).doc
|
||||
|
||||
fileInfo := doc.Find("div.file-info-entry").First().Text()
|
||||
assert.Contains(t, fileInfo, "Stored with Git LFS")
|
||||
assert.Contains(t, fileInfo, "LFS")
|
||||
|
||||
rawLink, exists := doc.Find("div.file-view > div.view-raw > a").Attr("href")
|
||||
assert.True(t, exists, "Download link should render instead of content because this is a binary file")
|
||||
|
Reference in New Issue
Block a user