summaryrefslogtreecommitdiffstats
path: root/modules/markup/html_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/html_test.go')
-rw-r--r--modules/markup/html_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go
index f494998c59..a7cf81250b 100644
--- a/modules/markup/html_test.go
+++ b/modules/markup/html_test.go
@@ -5,12 +5,14 @@
package markup_test
import (
+ "context"
"io"
"strings"
"testing"
"code.gitea.io/gitea/modules/emoji"
"code.gitea.io/gitea/modules/git"
+ "code.gitea.io/gitea/modules/log"
. "code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/markup/markdown"
"code.gitea.io/gitea/modules/setting"
@@ -25,6 +27,13 @@ var localMetas = map[string]string{
"repoPath": "../../integrations/gitea-repositories-meta/user13/repo11.git/",
}
+func TestMain(m *testing.M) {
+ setting.LoadAllowEmpty()
+ if err := git.InitSimple(context.Background()); err != nil {
+ log.Fatal("git init failed, err: %v", err)
+ }
+}
+
func TestRender_Commits(t *testing.T) {
setting.AppURL = TestAppURL
test := func(input, expected string) {