aboutsummaryrefslogtreecommitdiffstats
path: root/services/markup/processorhelper_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/markup/processorhelper_test.go')
-rw-r--r--services/markup/processorhelper_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/services/markup/processorhelper_test.go b/services/markup/processorhelper_test.go
new file mode 100644
index 0000000000..386465bc91
--- /dev/null
+++ b/services/markup/processorhelper_test.go
@@ -0,0 +1,20 @@
+// Copyright 2022 The Gitea Authors. All rights reserved.
+// Use of this source code is governed by a MIT-style
+// license that can be found in the LICENSE file.
+
+package markup
+
+import (
+ "context"
+ "testing"
+
+ "code.gitea.io/gitea/models/unittest"
+
+ "github.com/stretchr/testify/assert"
+)
+
+func TestProcessorHelper(t *testing.T) {
+ assert.NoError(t, unittest.PrepareTestDatabase())
+ assert.True(t, ProcessorHelper().IsUsernameMentionable(context.Background(), "user10"))
+ assert.False(t, ProcessorHelper().IsUsernameMentionable(context.Background(), "no-such-user"))
+}