]> source.dussan.org Git - gitea.git/commitdiff
Fix improper setup for integration tests (#2050)
authorEthan Koenig <etk39@cornell.edu>
Sun, 25 Jun 2017 09:34:30 +0000 (05:34 -0400)
committerLunny Xiao <xiaolunwen@gmail.com>
Sun, 25 Jun 2017 09:34:30 +0000 (17:34 +0800)
integrations/api_repo_test.go

index e4f907cc91566819e1186df6dccfb4794cb31704..4de0c52ab2b67e10cec91f6b99682cc85e6e1a34 100644 (file)
@@ -8,13 +8,11 @@ import (
        "net/http"
        "testing"
 
-       "code.gitea.io/gitea/models"
-
        "github.com/stretchr/testify/assert"
 )
 
 func TestAPIUserReposNotLogin(t *testing.T) {
-       assert.NoError(t, models.LoadFixtures())
+       prepareTestEnv(t)
 
        req := NewRequest(t, "GET", "/api/v1/users/user2/repos")
        resp := MakeRequest(req)
@@ -22,7 +20,7 @@ func TestAPIUserReposNotLogin(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")
        resp := MakeRequest(req)