mirror of
https://github.com/go-gitea/gitea
synced 2025-07-10 04:27:22 +00:00
Populate URL field of API commits (#3546)
* Populate URL field of API commits * fix orgmode_test
This commit is contained in:
@ -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+"]]",
|
||||
|
Reference in New Issue
Block a user