From f1adaef45849fc260b07be39a39b9c1ee5146923 Mon Sep 17 00:00:00 2001 From: Ethan Koenig Date: Fri, 7 Jul 2017 15:36:47 -0400 Subject: Less verbose integration tests (#2123) * Helper functions for intergration test boilerplate --- integrations/api_repo_test.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'integrations/api_repo_test.go') diff --git a/integrations/api_repo_test.go b/integrations/api_repo_test.go index 4de0c52ab2..180105d4c0 100644 --- a/integrations/api_repo_test.go +++ b/integrations/api_repo_test.go @@ -7,22 +7,18 @@ package integrations import ( "net/http" "testing" - - "github.com/stretchr/testify/assert" ) func TestAPIUserReposNotLogin(t *testing.T) { prepareTestEnv(t) req := NewRequest(t, "GET", "/api/v1/users/user2/repos") - resp := MakeRequest(req) - assert.EqualValues(t, http.StatusOK, resp.HeaderCode) + MakeRequest(t, req, http.StatusOK) } func TestAPISearchRepoNotLogin(t *testing.T) { prepareTestEnv(t) req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test") - resp := MakeRequest(req) - assert.EqualValues(t, http.StatusOK, resp.HeaderCode) + MakeRequest(t, req, http.StatusOK) } -- cgit v1.2.3