Merge pull request '[BUG] Escape editor.add_tmpl translation' (#3269) from gusted/forgejo-escape-tr into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3269 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
commit
a5a0fc7344
2 changed files with 14 additions and 1 deletions
|
@ -187,6 +187,19 @@ func TestEditFileToNewBranch(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestEditorAddTranslation(t *testing.T) {
|
||||
defer tests.PrepareTestEnv(t)()
|
||||
|
||||
session := loginUser(t, "user2")
|
||||
req := NewRequest(t, "GET", "/user2/repo1/_new/master")
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
|
||||
placeholder, ok := htmlDoc.Find("input[name='commit_summary']").Attr("placeholder")
|
||||
assert.True(t, ok)
|
||||
assert.EqualValues(t, `Add "<filename>"`, placeholder)
|
||||
}
|
||||
|
||||
func TestCommitMail(t *testing.T) {
|
||||
onGiteaRun(t, func(t *testing.T, _ *url.URL) {
|
||||
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue