summaryrefslogtreecommitdiffstats
path: root/integrations/delete_user_test.go
diff options
context:
space:
mode:
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)