diff options
author | Robert Speicher <robert@gitlab.com> | 2017-01-19 18:58:02 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-01-19 18:58:02 +0000 |
commit | 4b999ccd57c45ea8f30317c1ebde4623d67bf6f0 (patch) | |
tree | d56cdf40ca34806760ff83c2d81a8d7e18fc06d6 | |
parent | 2de5f511d153ae33a4ed6c21107cb21226ee9582 (diff) | |
parent | f7eb3573593035c8512424801e02c4cb8dddf4c8 (diff) | |
download | gitlab-ce-4b999ccd57c45ea8f30317c1ebde4623d67bf6f0.tar.gz |
Merge branch '26810-fix-undefined-method-revert_group_project_commit_path' into 'master'
Ensure group acts as a namespace for polymorphic routes
Closes #26810
See merge request !8627
-rw-r--r-- | app/views/projects/commit/_change.html.haml | 2 | ||||
-rw-r--r-- | spec/features/merge_requests/cherry_pick_spec.rb | 3 | ||||
-rw-r--r-- | spec/features/projects/commits/cherry_pick_spec.rb | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/app/views/projects/commit/_change.html.haml b/app/views/projects/commit/_change.html.haml index 990908211de..421b3db342d 100644 --- a/app/views/projects/commit/_change.html.haml +++ b/app/views/projects/commit/_change.html.haml @@ -13,7 +13,7 @@ %a.close{ href: "#", "data-dismiss" => "modal" } × %h3.page-title== #{label} this #{commit.change_type_title(current_user)} .modal-body - = form_tag [type.underscore, @project.namespace, @project, commit], method: :post, remote: false, class: "form-horizontal js-#{type}-form js-requires-input" do + = form_tag [type.underscore, @project.namespace.becomes(Namespace), @project, commit], method: :post, remote: false, class: "form-horizontal js-#{type}-form js-requires-input" do .form-group.branch = label_tag 'target_branch', target_label, class: 'control-label' .col-sm-10 diff --git a/spec/features/merge_requests/cherry_pick_spec.rb b/spec/features/merge_requests/cherry_pick_spec.rb index 82bc5226d07..dfe7c910a10 100644 --- a/spec/features/merge_requests/cherry_pick_spec.rb +++ b/spec/features/merge_requests/cherry_pick_spec.rb @@ -2,7 +2,8 @@ require 'spec_helper' describe 'Cherry-pick Merge Requests' do let(:user) { create(:user) } - let(:project) { create(:project) } + let(:group) { create(:group) } + let(:project) { create(:project, namespace: group) } let(:merge_request) { create(:merge_request_with_diffs, source_project: project, author: user) } before do diff --git a/spec/features/projects/commits/cherry_pick_spec.rb b/spec/features/projects/commits/cherry_pick_spec.rb index d46d9e9399e..7baf7913424 100644 --- a/spec/features/projects/commits/cherry_pick_spec.rb +++ b/spec/features/projects/commits/cherry_pick_spec.rb @@ -2,7 +2,8 @@ require 'spec_helper' include WaitForAjax describe 'Cherry-pick Commits' do - let(:project) { create(:project) } + let(:group) { create(:group) } + let(:project) { create(:project, namespace: group) } let(:master_pickable_commit) { project.commit('7d3b0f7cff5f37573aea97cebfd5692ea1689924') } let(:master_pickable_merge) { project.commit('e56497bb5f03a90a51293fc6d516788730953899') } |