diff options
Diffstat (limited to 'integrations/pull_create_test.go')
-rw-r--r-- | integrations/pull_create_test.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/integrations/pull_create_test.go b/integrations/pull_create_test.go index 00a23a29e0..89abccf883 100644 --- a/integrations/pull_create_test.go +++ b/integrations/pull_create_test.go @@ -56,7 +56,15 @@ func TestPullCreate(t *testing.T) { // check .diff can be accessed and matches performed change req := NewRequest(t, "GET", url+".diff") resp = session.MakeRequest(t, req, http.StatusOK) - assert.Regexp(t, "\\+Hello, World \\(Edited\\)", resp.Body) + assert.Regexp(t, `\+Hello, World \(Edited\)`, resp.Body) assert.Regexp(t, "^diff", resp.Body) assert.NotRegexp(t, "diff.*diff", resp.Body) // not two diffs, just one + + // check .patch can be accessed and matches performed change + req = NewRequest(t, "GET", url+".patch") + resp = session.MakeRequest(t, req, http.StatusOK) + assert.Regexp(t, `\+Hello, World \(Edited\)`, resp.Body) + assert.Regexp(t, "diff", resp.Body) + assert.Regexp(t, `Subject: \[PATCH\] Update 'README.md'`, resp.Body) + assert.NotRegexp(t, "diff.*diff", resp.Body) // not two diffs, just one } |