Fix improper setup for integration tests (#2050)

This commit is contained in:
Ethan Koenig 2017-06-25 05:34:30 -04:00 committed by Lunny Xiao
parent b4e8a7c4d1
commit 4c0e567062

View file

@ -8,13 +8,11 @@ import (
"net/http" "net/http"
"testing" "testing"
"code.gitea.io/gitea/models"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
) )
func TestAPIUserReposNotLogin(t *testing.T) { func TestAPIUserReposNotLogin(t *testing.T) {
assert.NoError(t, models.LoadFixtures()) prepareTestEnv(t)
req := NewRequest(t, "GET", "/api/v1/users/user2/repos") req := NewRequest(t, "GET", "/api/v1/users/user2/repos")
resp := MakeRequest(req) resp := MakeRequest(req)
@ -22,7 +20,7 @@ func TestAPIUserReposNotLogin(t *testing.T) {
} }
func TestAPISearchRepoNotLogin(t *testing.T) { func TestAPISearchRepoNotLogin(t *testing.T) {
assert.NoError(t, models.LoadFixtures()) prepareTestEnv(t)
req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test") req := NewRequest(t, "GET", "/api/v1/repos/search?q=Test")
resp := MakeRequest(req) resp := MakeRequest(req)