summaryrefslogtreecommitdiffstats
path: root/integrations/delete_user_test.go
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-06-09 20:41:36 -0400
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-06-09 19:41:36 -0500
commit61716bd8f70f55f2c5d4090c87700f6b9b6fc632 (patch)
treed3bab40ab681e0ccbbba964273ba32f6d0ace8e0 /integrations/delete_user_test.go
parent6d613fb28ef5d884bbea1e2a4d8c3e21fc398ecc (diff)
downloadgitea-61716bd8f70f55f2c5d4090c87700f6b9b6fc632.tar.gz
gitea-61716bd8f70f55f2c5d4090c87700f6b9b6fc632.zip
Display URLs in integration test logs (#1924)
Diffstat (limited to 'integrations/delete_user_test.go')
-rw-r--r--integrations/delete_user_test.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/integrations/delete_user_test.go b/integrations/delete_user_test.go
index bf38eeae2b..2040830f2e 100644
--- a/integrations/delete_user_test.go
+++ b/integrations/delete_user_test.go
@@ -20,18 +20,16 @@ func TestDeleteUser(t *testing.T) {
session := loginUser(t, "user1", "password")
- req, err := http.NewRequest("GET", "/admin/users/8", nil)
- assert.NoError(t, err)
+ req := NewRequest(t, "GET", "/admin/users/8")
resp := session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
doc, err := NewHtmlParser(resp.Body)
assert.NoError(t, err)
- req, err = http.NewRequest("POST", "/admin/users/8/delete",
+ req = NewRequestBody(t, "POST", "/admin/users/8/delete",
bytes.NewBufferString(url.Values{
"_csrf": []string{doc.GetInputValueByName("_csrf")},
}.Encode()))
- assert.NoError(t, err)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
resp = session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)