aboutsummaryrefslogtreecommitdiffstats
path: root/integrations/editor_test.go
diff options
context:
space:
mode:
authorMura Li <typeless@users.noreply.github.com>2017-06-15 19:20:39 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-06-15 19:20:39 +0800
commit01322af2e8e213209cddff5356b317ce4875fca3 (patch)
treeed80f658b6bcabdfa341ae529e5491545b586227 /integrations/editor_test.go
parent13f0e1255af5eeb3d6d24ee2c3a169dab427a2dc (diff)
downloadgitea-01322af2e8e213209cddff5356b317ce4875fca3.tar.gz
gitea-01322af2e8e213209cddff5356b317ce4875fca3.zip
Add integration test for pull-request merge (#1912)
Diffstat (limited to 'integrations/editor_test.go')
-rw-r--r--integrations/editor_test.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/integrations/editor_test.go b/integrations/editor_test.go
index 64212d3f29..540caca264 100644
--- a/integrations/editor_test.go
+++ b/integrations/editor_test.go
@@ -101,7 +101,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
assert.Contains(t, string(resp.Body), "Can not commit to protected branch &#39;master&#39;.")
}
-func testEditFile(t *testing.T, session *TestSession, user, repo, branch, filePath string) {
+func testEditFile(t *testing.T, session *TestSession, user, repo, branch, filePath string) *TestResponse {
newContent := "Hello, World (Edited)\n"
@@ -134,6 +134,8 @@ func testEditFile(t *testing.T, session *TestSession, user, repo, branch, filePa
resp = session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
assert.EqualValues(t, newContent, string(resp.Body))
+
+ return resp
}
func TestEditFile(t *testing.T) {