mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-19 02:29:20 -05:00
- Create `modules/testimport/import.go` to centralize blank import needed for tests (in order to run the `init` function) to simplify maintenance. - Remove the imports that are not needed. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10662 Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: limiting-factor <limiting-factor@posteo.com> Co-committed-by: limiting-factor <limiting-factor@posteo.com>
21 lines
426 B
Go
21 lines
426 B
Go
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package templates_test
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"forgejo.org/models/unittest"
|
|
"forgejo.org/modules/markup"
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
markup.Init(&markup.ProcessorHelper{
|
|
IsUsernameMentionable: func(ctx context.Context, username string) bool {
|
|
return username == "mention-user"
|
|
},
|
|
})
|
|
unittest.MainTest(m)
|
|
}
|