Handle more pathological branch and tag names (#11843)
* Handle more pathological branch and tag names Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix failing test Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
6c2a59b50c
commit
0973c03601
8 changed files with 42 additions and 88 deletions
|
@ -32,14 +32,14 @@ func TestDeleteBranch(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestUndoDeleteBranch(t *testing.T) {
|
||||
defer prepareTestEnv(t)()
|
||||
|
||||
deleteBranch(t)
|
||||
htmlDoc, name := branchAction(t, ".undo-button")
|
||||
assert.Contains(t,
|
||||
htmlDoc.doc.Find(".ui.positive.message").Text(),
|
||||
i18n.Tr("en", "repo.branch.restore_success", name),
|
||||
)
|
||||
onGiteaRun(t, func(t *testing.T, u *url.URL) {
|
||||
deleteBranch(t)
|
||||
htmlDoc, name := branchAction(t, ".undo-button")
|
||||
assert.Contains(t,
|
||||
htmlDoc.doc.Find(".ui.positive.message").Text(),
|
||||
i18n.Tr("en", "repo.branch.restore_success", name),
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
func deleteBranch(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue