Less verbose integration tests (#2123)
* Helper functions for intergration test boilerplate
This commit is contained in:

committed by
Kim "BKC" Carlbäcker

parent
5651cc7413
commit
f1adaef458
@ -9,8 +9,6 @@ import (
|
||||
"testing"
|
||||
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestSignup(t *testing.T) {
|
||||
@ -24,11 +22,9 @@ func TestSignup(t *testing.T) {
|
||||
"password": "examplePassword",
|
||||
"retype": "examplePassword",
|
||||
})
|
||||
resp := MakeRequest(req)
|
||||
assert.EqualValues(t, http.StatusFound, resp.HeaderCode)
|
||||
MakeRequest(t, req, http.StatusFound)
|
||||
|
||||
// should be able to view new user's page
|
||||
req = NewRequest(t, "GET", "/exampleUser")
|
||||
resp = MakeRequest(req)
|
||||
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
|
||||
MakeRequest(t, req, http.StatusOK)
|
||||
}
|
||||
|
Reference in New Issue
Block a user