diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-05-02 22:23:48 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-05-02 22:23:48 +0000 |
commit | 244f511eece07e906ec82bebf3ccb2f69a15ea92 (patch) | |
tree | 05fbe11c6e843c5444b2802bd1ec3d5e5f97ec39 /spec/controllers/projects/merge_requests | |
parent | 8bf030722dee9904e9b29bfd14c0099be9179b92 (diff) | |
download | gitlab-ce-244f511eece07e906ec82bebf3ccb2f69a15ea92.tar.gz |
Load branches on new merge request page asynchronously
Diffstat (limited to 'spec/controllers/projects/merge_requests')
-rw-r--r-- | spec/controllers/projects/merge_requests/creations_controller_spec.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/spec/controllers/projects/merge_requests/creations_controller_spec.rb b/spec/controllers/projects/merge_requests/creations_controller_spec.rb index 24310b847e8..00d76f3c39a 100644 --- a/spec/controllers/projects/merge_requests/creations_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/creations_controller_spec.rb @@ -157,34 +157,4 @@ describe Projects::MergeRequests::CreationsController do expect(response).to have_gitlab_http_status(200) end end - - describe 'GET #update_branches' do - before do - allow(Ability).to receive(:allowed?).and_call_original - end - - it 'lists the branches of another fork if the user has access' do - expect(Ability).to receive(:allowed?).with(user, :read_project, project) { true } - - get :update_branches, - namespace_id: fork_project.namespace, - project_id: fork_project, - target_project_id: project.id - - expect(assigns(:target_branches)).not_to be_empty - expect(response).to have_gitlab_http_status(200) - end - - it 'does not list branches when the user cannot read the project' do - expect(Ability).to receive(:allowed?).with(user, :read_project, project) { false } - - get :update_branches, - namespace_id: fork_project.namespace, - project_id: fork_project, - target_project_id: project.id - - expect(response).to have_gitlab_http_status(200) - expect(assigns(:target_branches)).to eq([]) - end - end end |