From 61716bd8f70f55f2c5d4090c87700f6b9b6fc632 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Fri, 9 Jun 2017 20:41:36 -0400 Subject: Display URLs in integration test logs (#1924) --- integrations/signup_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'integrations/signup_test.go') diff --git a/integrations/signup_test.go b/integrations/signup_test.go index 49017b29ff..4bb84c1a20 100644 --- a/integrations/signup_test.go +++ b/integrations/signup_test.go @@ -20,7 +20,7 @@ func TestSignup(t *testing.T) { setting.Service.EnableCaptcha = false - req, err := http.NewRequest("POST", "/user/sign_up", + req := NewRequestBody(t, "POST", "/user/sign_up", bytes.NewBufferString(url.Values{ "user_name": []string{"exampleUser"}, "email": []string{"exampleUser@example.com"}, @@ -28,14 +28,12 @@ func TestSignup(t *testing.T) { "retype": []string{"examplePassword"}, }.Encode()), ) - assert.NoError(t, err) req.Header.Add("Content-Type", "application/x-www-form-urlencoded") resp := MakeRequest(req) assert.EqualValues(t, http.StatusFound, resp.HeaderCode) // should be able to view new user's page - req, err = http.NewRequest("GET", "/exampleUser", nil) - assert.NoError(t, err) + req = NewRequest(t, "GET", "/exampleUser") resp = MakeRequest(req) assert.EqualValues(t, http.StatusOK, resp.HeaderCode) } -- cgit v1.2.3