We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61f3b4b commit 292c787Copy full SHA for 292c787
services/repository/transfer_test.go
@@ -5,15 +5,28 @@
5
package repository
6
7
import (
8
+ "sync"
9
"testing"
10
11
"code.gitea.io/gitea/models"
12
+ "code.gitea.io/gitea/modules/notification"
13
+ "code.gitea.io/gitea/modules/notification/action"
14
15
"github.com/stretchr/testify/assert"
16
"github.com/unknwon/com"
17
)
18
19
+var notifySync sync.Once
20
+
21
+func registerNotifier() {
22
+ notifySync.Do(func() {
23
+ notification.RegisterNotifier(action.NewNotifier())
24
+ })
25
+}
26
27
func TestTransferOwnership(t *testing.T) {
28
+ registerNotifier()
29
30
assert.NoError(t, models.PrepareTestDatabase())
31
32
doer := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User)
0 commit comments