summaryrefslogtreecommitdiffstats
path: root/modules/templates/main_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/templates/main_test.go')
-rw-r--r--modules/templates/main_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/modules/templates/main_test.go b/modules/templates/main_test.go
new file mode 100644
index 0000000..bbdf5d2
--- /dev/null
+++ b/modules/templates/main_test.go
@@ -0,0 +1,24 @@
+// Copyright 2024 The Forgejo Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+package templates_test
+
+import (
+ "context"
+ "testing"
+
+ "code.gitea.io/gitea/models/unittest"
+ "code.gitea.io/gitea/modules/markup"
+
+ _ "code.gitea.io/gitea/models"
+ _ "code.gitea.io/gitea/models/issues"
+)
+
+func TestMain(m *testing.M) {
+ markup.Init(&markup.ProcessorHelper{
+ IsUsernameMentionable: func(ctx context.Context, username string) bool {
+ return username == "mention-user"
+ },
+ })
+ unittest.MainTest(m)
+}