Populate URL field of API commits (#3546)

* Populate URL field of API commits

* fix orgmode_test
This commit is contained in:
Ethan Koenig 2018-02-20 04:50:42 -08:00 committed by Bo-Yi Wu
parent 7b297808ce
commit 7b104f0cd0
11 changed files with 126 additions and 98 deletions

View file

@ -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,