Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
  • Loading branch information
yardenshoham committed Oct 22, 2022
1 parent a1c2cb3 commit 08bdc8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/markup/processorhelper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
package markup

import (
"context"
"testing"

"code.gitea.io/gitea/models/unittest"
"code.gitea.io/gitea/modules/context"

"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"))
assert.True(t, ProcessorHelper().IsUsernameMentionable(&context.Context{}, "user10"))
assert.False(t, ProcessorHelper().IsUsernameMentionable(&context.Context{}, "no-such-user"))
}

0 comments on commit 08bdc8b

Please sign in to comment.