diff options
Diffstat (limited to 'integrations/internal_test.go')
-rw-r--r-- | integrations/internal_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/integrations/internal_test.go b/integrations/internal_test.go index d58b8b0b4e..3c8657e642 100644 --- a/integrations/internal_test.go +++ b/integrations/internal_test.go @@ -25,12 +25,12 @@ func assertProtectedBranch(t *testing.T, repoID int64, branchName string, isErr, resp := MakeRequest(t, req, NoExpectedStatus) if isErr { - assert.EqualValues(t, http.StatusInternalServerError, resp.HeaderCode) + assert.EqualValues(t, http.StatusInternalServerError, resp.Code) } else { - assert.EqualValues(t, http.StatusOK, resp.HeaderCode) + assert.EqualValues(t, http.StatusOK, resp.Code) var branch models.ProtectedBranch - t.Log(string(resp.Body)) - assert.NoError(t, json.Unmarshal(resp.Body, &branch)) + t.Log(resp.Body.String()) + assert.NoError(t, json.Unmarshal(resp.Body.Bytes(), &branch)) assert.Equal(t, canPush, !branch.IsProtected()) } } |