Populate URL field of API commits (#3546)

* Populate URL field of API commits

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

No files matched your search

+3 -3
View File
@@ -8,8 +8,8 @@ import (
"strings"
"testing"
"code.gitea.io/gitea/modules/markup"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
"github.com/stretchr/testify/assert"
)
@@ -30,7 +30,7 @@ func TestRender_StandardLinks(t *testing.T) {
googleRendered := `<p><a href="https://google.com/" title="https://google.com/">https://google.com/</a></p>`
test("[[https://google.com/]]", googleRendered)
lnk := markup.URLJoin(AppSubURL, "WikiPage")
lnk := util.URLJoin(AppSubURL, "WikiPage")
test("[[WikiPage][WikiPage]]",
`<p><a href="`+lnk+`" title="WikiPage">WikiPage</a></p>`)
}
@@ -46,7 +46,7 @@ func TestRender_Images(t *testing.T) {
url := "../../.images/src/02/train.jpg"
title := "Train"
result := markup.URLJoin(AppSubURL, url)
result := util.URLJoin(AppSubURL, url)
test(
"[[file:"+url+"]["+title+"]]",