summaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-06-12 00:49:47 +0100
committerGitHub <noreply@github.com>2020-06-11 19:49:47 -0400
commit0973c036019c955172ebce99d58eede2e9ac55ca (patch)
tree7c49364bba0ebfb4eb8c4bb5194f643629b929bc /integrations
parent6c2a59b50c2af367281492b6c6adc9061e57b0a9 (diff)
downloadgitea-0973c036019c955172ebce99d58eede2e9ac55ca.tar.gz
gitea-0973c036019c955172ebce99d58eede2e9ac55ca.zip
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>
Diffstat (limited to 'integrations')
-rw-r--r--integrations/branches_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/integrations/branches_test.go b/integrations/branches_test.go
index ed6a73fdb4..2b9fc8dda5 100644
--- a/integrations/branches_test.go
+++ b/integrations/branches_test.go
@@ -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) {