refactor(documents): rename document tree model
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
func TestSharedPreviewBodySanitizesMarkdownHTMLAndUnsafeLinks(t *testing.T) {
|
||||
body := sharedPreviewBody(SharedDocument{
|
||||
Document: models.SaDocument{Name: "shared.md", Extension: ".md"},
|
||||
Document: models.SaDocumentTree{Name: "shared.md", Extension: ".md"},
|
||||
Content: &models.SaDocumentContent{
|
||||
Markdown: "# 标题\n\n<script>alert(1)</script>\n\n[危险链接](javascript:alert(2))",
|
||||
},
|
||||
@@ -23,7 +23,7 @@ func TestSharedPreviewBodySanitizesMarkdownHTMLAndUnsafeLinks(t *testing.T) {
|
||||
|
||||
func TestSharedPreviewBodyEmbedsSupportedBlobWithoutDownloadLink(t *testing.T) {
|
||||
body := sharedPreviewBody(SharedDocument{
|
||||
Document: models.SaDocument{Name: "manual.pdf", Extension: ".pdf", MimeType: "application/pdf"},
|
||||
Document: models.SaDocumentTree{Name: "manual.pdf", Extension: ".pdf", MimeType: "application/pdf"},
|
||||
Blob: &models.SaDocumentBlob{StorageKey: "blob"},
|
||||
}, "https://example.test/content")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user