1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-03 09:07:19 +00:00

Support quote selected comments to reply (#32431)

Many existing tests were quite hacky, these could be improved later.

<details>

![image](https://github.com/user-attachments/assets/93aebb4f-9de5-4cb8-910b-50c64cbcd25a)

</details>
This commit is contained in:
wxiaoguang
2024-11-07 11:57:07 +08:00
committed by GitHub
parent 276500c314
commit 145e266987
16 changed files with 255 additions and 70 deletions

View File

@ -38,7 +38,8 @@ func testRenderMarkup(t *testing.T, mode string, wiki bool, filePath, text, expe
ctx, resp := contexttest.MockAPIContext(t, "POST /api/v1/markup")
web.SetForm(ctx, &options)
Markup(ctx)
assert.Equal(t, expectedBody, resp.Body.String())
actual := strings.ReplaceAll(resp.Body.String(), ` data-markdown-generated-content=""`, "")
assert.Equal(t, expectedBody, actual)
assert.Equal(t, expectedCode, resp.Code)
resp.Body.Reset()
}
@ -58,7 +59,8 @@ func testRenderMarkdown(t *testing.T, mode string, wiki bool, text, responseBody
ctx, resp := contexttest.MockAPIContext(t, "POST /api/v1/markdown")
web.SetForm(ctx, &options)
Markdown(ctx)
assert.Equal(t, responseBody, resp.Body.String())
actual := strings.ReplaceAll(resp.Body.String(), ` data-markdown-generated-content=""`, "")
assert.Equal(t, responseBody, actual)
assert.Equal(t, responseCode, resp.Code)
resp.Body.Reset()
}