Add integration test for pull-request merge (#1912)

This commit is contained in:
Mura Li 2017-06-15 19:20:39 +08:00 committed by Lunny Xiao
parent 13f0e1255a
commit 01322af2e8
4 changed files with 62 additions and 3 deletions

View file

@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/assert"
)
func testPullCreate(t *testing.T, session *TestSession, user, repo, branch string) {
func testPullCreate(t *testing.T, session *TestSession, user, repo, branch string) *TestResponse {
req := NewRequest(t, "GET", path.Join(user, repo))
resp := session.MakeRequest(t, req)
assert.EqualValues(t, http.StatusOK, resp.HeaderCode)
@ -45,6 +45,8 @@ func testPullCreate(t *testing.T, session *TestSession, user, repo, branch strin
assert.EqualValues(t, http.StatusFound, resp.HeaderCode)
//TODO check the redirected URL
return resp
}
func TestPullCreate(t *testing.T) {