Less verbose integration tests (#2123)
* Helper functions for intergration test boilerplate
This commit is contained in:
parent
5651cc7413
commit
f1adaef458
24 changed files with 121 additions and 222 deletions
|
@ -18,7 +18,7 @@ func testAPIGetBranch(t *testing.T, branchName string, exists bool) {
|
|||
|
||||
session := loginUser(t, "user2")
|
||||
req := NewRequestf(t, "GET", "/api/v1/repos/user2/repo1/branches/%s", branchName)
|
||||
resp := session.MakeRequest(t, req)
|
||||
resp := session.MakeRequest(t, req, NoExpectedStatus)
|
||||
if !exists {
|
||||
assert.EqualValues(t, http.StatusNotFound, resp.HeaderCode)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue