diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-06 13:47:52 +0100 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-06 13:47:52 +0100 |
commit | 9cee280d7045d87a4c0854c0c281c98ba3a085e7 (patch) | |
tree | d65da90310054d83a81588a4886f11c88c59ca5c /spec/controllers/projects/merge_requests_controller_spec.rb | |
parent | 2a18425e97023b05aa52c29dbce6c5a7aa7400b7 (diff) | |
parent | 66d03aae98cc0429d2ed75eac68025f447868479 (diff) | |
download | gitlab-ce-9cee280d7045d87a4c0854c0c281c98ba3a085e7.tar.gz |
Merge branch 'update-droplab-to-webpack-version' into new-resolvable-discussion
Diffstat (limited to 'spec/controllers/projects/merge_requests_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/merge_requests_controller_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 6cf4a97e76f..1739d40ab88 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -176,6 +176,18 @@ describe Projects::MergeRequestsController do expect(assigns(:merge_requests).current_page).to eq(last_page) expect(response).to have_http_status(200) end + + it 'does not redirect to external sites when provided a host field' do + external_host = "www.example.com" + get :index, + namespace_id: project.namespace.to_param, + project_id: project, + state: 'opened', + page: (last_page + 1).to_param, + host: external_host + + expect(response).to redirect_to(namespace_project_merge_requests_path(page: last_page, state: controller.params[:state], scope: controller.params[:scope])) + end end context 'when filtering by opened state' do |