mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-16 15:02:43 +00:00
Populate URL field of API commits (#3546)
* Populate URL field of API commits * fix orgmode_test
This commit is contained in:
parent
7b297808ce
commit
7b104f0cd0
11 changed files with 126 additions and 98 deletions
|
@ -9,8 +9,8 @@ import (
|
|||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/markup"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
api "code.gitea.io/sdk/gitea"
|
||||
|
||||
"github.com/go-macaron/inject"
|
||||
|
@ -53,7 +53,7 @@ func TestAPI_RenderGFM(t *testing.T) {
|
|||
Context: Repo,
|
||||
Wiki: true,
|
||||
}
|
||||
requrl, _ := url.Parse(markup.URLJoin(AppURL, "api", "v1", "markdown"))
|
||||
requrl, _ := url.Parse(util.URLJoin(AppURL, "api", "v1", "markdown"))
|
||||
req := &http.Request{
|
||||
Method: "POST",
|
||||
URL: requrl,
|
||||
|
@ -147,7 +147,7 @@ func TestAPI_RenderSimple(t *testing.T) {
|
|||
Text: "",
|
||||
Context: Repo,
|
||||
}
|
||||
requrl, _ := url.Parse(markup.URLJoin(AppURL, "api", "v1", "markdown"))
|
||||
requrl, _ := url.Parse(util.URLJoin(AppURL, "api", "v1", "markdown"))
|
||||
req := &http.Request{
|
||||
Method: "POST",
|
||||
URL: requrl,
|
||||
|
@ -166,7 +166,7 @@ func TestAPI_RenderSimple(t *testing.T) {
|
|||
func TestAPI_RenderRaw(t *testing.T) {
|
||||
setting.AppURL = AppURL
|
||||
|
||||
requrl, _ := url.Parse(markup.URLJoin(AppURL, "api", "v1", "markdown"))
|
||||
requrl, _ := url.Parse(util.URLJoin(AppURL, "api", "v1", "markdown"))
|
||||
req := &http.Request{
|
||||
Method: "POST",
|
||||
URL: requrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue