diff options
author | Robert Speicher <robert@gitlab.com> | 2016-06-29 05:26:38 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-06-29 05:26:38 +0300 |
commit | 5423e6e2d5f47ea72958086c545fb9f55ce320cb (patch) | |
tree | 774d00d6e81a55020537854bb9557787a0dbfc18 /spec/controllers | |
parent | d171ff17beb82c2378c1eae52dada91481a48239 (diff) | |
parent | db0a6c10edff0eebe81297763dd9e0a9965c507f (diff) |
Merge branch 'zj-workhorse-format-patch' into 'master'
Workhorse to serve email diffs
See merge request !4590
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 1cc35c66c8f..74c050f48f1 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -96,26 +96,14 @@ describe Projects::MergeRequestsController do end describe "as patch" do - include_examples "export merge as", :patch - let(:format) { :patch } - - it "should really be a git email patch with commit" do - get(:show, - namespace_id: project.namespace.to_param, - project_id: project.to_param, - id: merge_request.iid, format: format) - - expect(response.body[0..100]).to start_with("From #{merge_request.commits.last.id}") - end - - it "should contain git diffs" do + it 'triggers workhorse to serve the request' do get(:show, namespace_id: project.namespace.to_param, project_id: project.to_param, id: merge_request.iid, - format: format) + format: :patch) - expect(response.body).to match(/^diff --git/) + expect(response.headers['Gitlab-Workhorse-Send-Data']).to start_with("git-format-patch:") end end end |