mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 01:57:20 +00:00
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
@ -21,8 +21,7 @@ func TestAPIViewPulls(t *testing.T) {
|
||||
|
||||
session := loginUser(t, "user2")
|
||||
req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/pulls?state=all", owner.Name, repo.Name)
|
||||
resp := session.MakeRequest(t, req)
|
||||
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
var pulls []*api.PullRequest
|
||||
DecodeJSON(t, resp, &pulls)
|
||||
|
Reference in New Issue
Block a user