From 0973c036019c955172ebce99d58eede2e9ac55ca Mon Sep 17 00:00:00 2001 From: zeripath Date: Fri, 12 Jun 2020 00:49:47 +0100 Subject: Handle more pathological branch and tag names (#11843) * Handle more pathological branch and tag names Signed-off-by: Andrew Thornton * Fix failing test Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- integrations/branches_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'integrations/branches_test.go') 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) { -- cgit v1.2.3