mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Move more webhook codes from models to webhook module (#8802)
* Move more webhook codes from models to webhook module
This commit is contained in:
1 parent
491887d441
commit
a966a0298e
12 files changed
+145
-135
No files matched your search
@@ -12,6 +12,18 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestWebhook_GetSlackHook(t *testing.T) {
|
||||
w := &models.Webhook{
|
||||
Meta: `{"channel": "foo", "username": "username", "color": "blue"}`,
|
||||
}
|
||||
slackHook := GetSlackHook(w)
|
||||
assert.Equal(t, *slackHook, SlackMeta{
|
||||
Channel: "foo",
|
||||
Username: "username",
|
||||
Color: "blue",
|
||||
})
|
||||
}
|
||||
|
||||
func TestPrepareWebhooks(t *testing.T) {
|
||||
assert.NoError(t, models.PrepareTestDatabase())
|
||||
|
||||
|
||||
Reference in new issue
Block a user