Merge pull request '[REFACTOR] webhook.Handler interface' (#2758) from oliverpool/forgejo:webhook_2_interface into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2758 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
e41e18f87e
35 changed files with 378 additions and 210 deletions
|
@ -40,5 +40,6 @@ func TestAPICreateHook(t *testing.T) {
|
|||
var apiHook *api.Hook
|
||||
DecodeJSON(t, resp, &apiHook)
|
||||
assert.Equal(t, "http://example.com/", apiHook.Config["url"])
|
||||
assert.Equal(t, "http://example.com/", apiHook.URL)
|
||||
assert.Equal(t, "Bearer s3cr3t", apiHook.AuthorizationHeader)
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import (
|
|||
"testing"
|
||||
|
||||
gitea_context "code.gitea.io/gitea/services/context"
|
||||
"code.gitea.io/gitea/services/webhook"
|
||||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/PuerkitoBio/goquery"
|
||||
|
@ -21,7 +22,7 @@ func TestNewWebHookLink(t *testing.T) {
|
|||
defer tests.PrepareTestEnv(t)()
|
||||
session := loginUser(t, "user2")
|
||||
|
||||
webhooksLen := 12
|
||||
webhooksLen := len(webhook.List())
|
||||
baseurl := "/user2/repo1/settings/hooks"
|
||||
tests := []string{
|
||||
// webhook list page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue