diff options
Diffstat (limited to 'integrations/api_repo_test.go')
-rw-r--r-- | integrations/api_repo_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/integrations/api_repo_test.go b/integrations/api_repo_test.go index 64649efe1d..e4f907cc91 100644 --- a/integrations/api_repo_test.go +++ b/integrations/api_repo_test.go @@ -16,8 +16,7 @@ import ( func TestAPIUserReposNotLogin(t *testing.T) { assert.NoError(t, models.LoadFixtures()) - req, err := http.NewRequest("GET", "/api/v1/users/user2/repos", nil) - assert.NoError(t, err) + req := NewRequest(t, "GET", "/api/v1/users/user2/repos") resp := MakeRequest(req) assert.EqualValues(t, http.StatusOK, resp.HeaderCode) } @@ -25,8 +24,7 @@ func TestAPIUserReposNotLogin(t *testing.T) { func TestAPISearchRepoNotLogin(t *testing.T) { assert.NoError(t, models.LoadFixtures()) - req, err := http.NewRequest("GET", "/api/v1/repos/search?q=Test", nil) - assert.NoError(t, err) + req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test") resp := MakeRequest(req) assert.EqualValues(t, http.StatusOK, resp.HeaderCode) } |