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
|
@ -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+"]]",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue