mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 05:56:14 +01:00
0c71afea31
- Render the correct label for pull requests, it should link to the pull
requests list and not the issue list.
- Add unit test.
- Resolves https://codeberg.org/forgejo/forgejo/issues/3183
(cherry picked from commit 7a97c05206
)
24 lines
514 B
Go
24 lines
514 B
Go
// 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)
|
|
}
|