Skip to content

Commit 9269751

Browse files
committed
fix tests
1 parent 451a37c commit 9269751

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/repository/files/tree_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package files
55

66
import (
7+
"html/template"
78
"testing"
89

910
"code.gitea.io/gitea/models/unittest"
@@ -68,6 +69,7 @@ func TestGetTreeViewNodes(t *testing.T) {
6869
{
6970
EntryName: "docs",
7071
EntryMode: "tree",
72+
FileIcon: template.HTML(`<svg id="svg-mfi-folder-docs" class="svg git-entry-icon octicon-file-directory-fill" width="16" height="16" aria-hidden="true" viewBox='0 0 32 32'><path fill='#0277bd' d='m13.844 7.536-1.288-1.072A2 2 0 0 0 11.276 6H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V10a2 2 0 0 0-2-2H15.124a2 2 0 0 1-1.28-.464'/><path fill='#b3e5fc' d='M24 10h-7a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V16Zm0 16h-6v-2h6Zm4-4H18v-2h10Zm-4.828-5.172V12L28 16.828Z'/></svg>`),
7173
FullPath: "docs",
7274
},
7375
}, treeNodes)
@@ -78,11 +80,13 @@ func TestGetTreeViewNodes(t *testing.T) {
7880
{
7981
EntryName: "docs",
8082
EntryMode: "tree",
83+
FileIcon: template.HTML(`<svg class="svg git-entry-icon octicon-file-directory-fill" width="16" height="16" aria-hidden="true"><use xlink:href="#svg-mfi-folder-docs"></use></svg>`),
8184
FullPath: "docs",
8285
Children: []*TreeViewNode{
8386
{
8487
EntryName: "README.md",
8588
EntryMode: "blob",
89+
FileIcon: template.HTML(`<svg id="svg-mfi-readme" class="svg git-entry-icon octicon-file" width="16" height="16" aria-hidden="true" fill='none' viewBox='0 0 16 16'><path d='M0 0h24v24H0z'/><path fill='#42a5f5' d='M8 1C4.136 1 1 4.136 1 8s3.136 7 7 7 7-3.136 7-7-3.136-7-7-7m1 11H7V7.5h2zm0-6H7V4h2z'/></svg>`),
8690
FullPath: "docs/README.md",
8791
},
8892
},
@@ -95,6 +99,7 @@ func TestGetTreeViewNodes(t *testing.T) {
9599
{
96100
EntryName: "README.md",
97101
EntryMode: "blob",
102+
FileIcon: template.HTML(`<svg class="svg git-entry-icon octicon-file" width="16" height="16" aria-hidden="true"><use xlink:href="#svg-mfi-readme"></use></svg>`),
98103
FullPath: "docs/README.md",
99104
},
100105
}, treeNodes)

0 commit comments

Comments
 (0)