diff options
author | Ethan Koenig <etk39@cornell.edu> | 2017-06-09 20:41:36 -0400 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-06-09 19:41:36 -0500 |
commit | 61716bd8f70f55f2c5d4090c87700f6b9b6fc632 (patch) | |
tree | d3bab40ab681e0ccbbba964273ba32f6d0ace8e0 /integrations/signup_test.go | |
parent | 6d613fb28ef5d884bbea1e2a4d8c3e21fc398ecc (diff) | |
download | gitea-61716bd8f70f55f2c5d4090c87700f6b9b6fc632.tar.gz gitea-61716bd8f70f55f2c5d4090c87700f6b9b6fc632.zip |
Display URLs in integration test logs (#1924)
Diffstat (limited to 'integrations/signup_test.go')
-rw-r--r-- | integrations/signup_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
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) } |