1
0
Fork 0
forked from forgejo/forgejo

Less verbose integration tests (#2123)

* Helper functions for intergration test boilerplate
This commit is contained in:
Ethan Koenig 2017-07-07 15:36:47 -04:00 committed by Kim "BKC" Carlbäcker
parent 5651cc7413
commit f1adaef458
24 changed files with 121 additions and 222 deletions

View file

@ -26,8 +26,7 @@ func TestAPIListComments(t *testing.T) {
session := loginUser(t, repoOwner.Name)
req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues/%d/comments",
repoOwner.Name, repo.Name, issue.Index)
resp := session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
resp := session.MakeRequest(t, req, http.StatusOK)
var comments []*api.Comment
DecodeJSON(t, resp, &comments)