mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
Less verbose integration tests (#2123)
* Helper functions for intergration test boilerplate
This commit is contained in:
1 parent
5651cc7413
commit
f1adaef458
24 files changed
+121
-222
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user