Backport #30795 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
97a7c04a8f
commit
ac91bb27ff
4 changed files with 14 additions and 10 deletions
|
@ -207,3 +207,8 @@ func TestRenderLabels(t *testing.T) {
|
|||
expected = `/owner/repo/pulls?labels=123`
|
||||
assert.Contains(t, RenderLabels(ctx, locale, []*issues.Label{label}, "/owner/repo", issue), expected)
|
||||
}
|
||||
|
||||
func TestUserMention(t *testing.T) {
|
||||
rendered := RenderMarkdownToHtml(context.Background(), "@no-such-user @mention-user @mention-user")
|
||||
assert.EqualValues(t, `<p>@no-such-user <a href="/mention-user" rel="nofollow">@mention-user</a> <a href="/mention-user" rel="nofollow">@mention-user</a></p>`, strings.TrimSpace(string(rendered)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue