summaryrefslogtreecommitdiffstats
path: root/integrations/repo_fork_test.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-12-03 14:46:01 -0800
committerLauris BH <lauris@nix.lv>2017-12-04 00:46:01 +0200
commite59adcde655aac0e8afd3249407c9a0a2b1b1d6b (patch)
treea1b5859eadfe6ffdfc106012b7eab13a16459813 /integrations/repo_fork_test.go
parent993b86628bdf62c0565c2a57a73561bb2d535b22 (diff)
downloadgitea-e59adcde655aac0e8afd3249407c9a0a2b1b1d6b.tar.gz
gitea-e59adcde655aac0e8afd3249407c9a0a2b1b1d6b.zip
Use httptest in integration tests (#3080)
Diffstat (limited to 'integrations/repo_fork_test.go')
-rw-r--r--integrations/repo_fork_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/integrations/repo_fork_test.go b/integrations/repo_fork_test.go
index f8cc2e3f3b..64bc46f777 100644
--- a/integrations/repo_fork_test.go
+++ b/integrations/repo_fork_test.go
@@ -7,6 +7,7 @@ package integrations
import (
"fmt"
"net/http"
+ "net/http/httptest"
"testing"
"code.gitea.io/gitea/models"
@@ -14,7 +15,7 @@ import (
"github.com/stretchr/testify/assert"
)
-func testRepoFork(t *testing.T, session *TestSession, ownerName, repoName, forkOwnerName, forkRepoName string) *TestResponse {
+func testRepoFork(t *testing.T, session *TestSession, ownerName, repoName, forkOwnerName, forkRepoName string) *httptest.ResponseRecorder {
forkOwner := models.AssertExistsAndLoadBean(t, &models.User{Name: forkOwnerName}).(*models.User)
// Step0: check the existence of the to-fork repo