summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/misc/markdown_test.go
diff options
context:
space:
mode:
authorAndrew Boyarshin <andrew.boyarshin@gmail.com>2017-02-24 21:59:56 +0700
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-24 22:59:56 +0800
commit0602a44b276b009c1f7eb65c589ec284ef4131cf (patch)
tree8177d22a525e6bd7dcc535b58f1813c19ec9efac /routers/api/v1/misc/markdown_test.go
parent12e71e570619aa6f0e0289caa0b000158260065b (diff)
downloadgitea-0602a44b276b009c1f7eb65c589ec284ef4131cf.tar.gz
gitea-0602a44b276b009c1f7eb65c589ec284ef4131cf.zip
Fix URL handling in the whole markdown module, improve test coverage (#1027)
Amended with string to bool change in API SDK. Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
Diffstat (limited to 'routers/api/v1/misc/markdown_test.go')
-rw-r--r--routers/api/v1/misc/markdown_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/api/v1/misc/markdown_test.go b/routers/api/v1/misc/markdown_test.go
index 398e652d21..ae7a445e86 100644
--- a/routers/api/v1/misc/markdown_test.go
+++ b/routers/api/v1/misc/markdown_test.go
@@ -53,6 +53,7 @@ func TestAPI_RenderGFM(t *testing.T) {
Mode: "gfm",
Text: "",
Context: Repo,
+ Wiki: true,
}
requrl, _ := url.Parse(markdown.URLJoin(AppURL, "api", "v1", "markdown"))
req := &http.Request{
@@ -74,7 +75,7 @@ func TestAPI_RenderGFM(t *testing.T) {
<ul>
<li><a href="` + AppSubURL + `wiki/Links" rel="nofollow">Links, Language bindings, Engine bindings</a></li>
<li><a href="` + AppSubURL + `wiki/Tips" rel="nofollow">Tips</a></li>
-<li>Bezier widget (by <a href="` + AppURL + `r-lyeh" rel="nofollow">@r-lyeh</a>)<a href="` + AppSubURL + `issues/786" rel="nofollow">#786</a></li>
+<li>Bezier widget (by <a href="` + AppURL + `r-lyeh" rel="nofollow">@r-lyeh</a>)<a href="https://github.com/ocornut/imgui/issues/786" rel="nofollow">#786</a></li>
</ul>
`,
// wine-staging wiki home extract: special wiki syntax, images
@@ -97,7 +98,7 @@ Here are some links to the most important topics. You can find the full list of
<p>Here are some links to the most important topics. You can find the full list of pages at the sidebar.</p>
<p><a href="` + AppSubURL + `wiki/Configuration" rel="nofollow">Configuration</a>
-<a href="` + AppSubURL + `wiki/raw/images%2Ficon-bug.png" rel="nofollow"><img src="` + AppSubURL + `wiki/raw/images%2Ficon-bug.png" alt="images/icon-bug.png" title="icon-bug.png"/></a></p>
+<a href="` + AppSubURL + `wiki/raw/images/icon-bug.png" rel="nofollow"><img src="` + AppSubURL + `wiki/raw/images/icon-bug.png" alt="images/icon-bug.png" title="icon-bug.png"/></a></p>
`,
// Guard wiki sidebar: special syntax
`[[Guardfile-DSL / Configuring-Guard|Guardfile-DSL---Configuring-Guard]]`,