diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-06 18:27:12 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-04-11 10:51:16 +0200 |
commit | 083b0a9b034a0e4004c012444f1a8811bd96ed29 (patch) | |
tree | 942fcb5b65d17323130f6e8b5a6a499b2235c07d /spec/views | |
parent | 1747a573dff40ab51ba892bf9f5293e3c9b794d6 (diff) | |
download | gitlab-ce-083b0a9b034a0e4004c012444f1a8811bd96ed29.tar.gz |
Hide file/directory creation buttons
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/buttons/_dropdown.html.haml_spec.rb | 3 | ||||
-rw-r--r-- | spec/views/projects/tree/show.html.haml_spec.rb | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/views/projects/buttons/_dropdown.html.haml_spec.rb b/spec/views/projects/buttons/_dropdown.html.haml_spec.rb index d0e692635b9..8b9aab30286 100644 --- a/spec/views/projects/buttons/_dropdown.html.haml_spec.rb +++ b/spec/views/projects/buttons/_dropdown.html.haml_spec.rb @@ -8,7 +8,8 @@ describe 'projects/buttons/_dropdown' do assign(:project, project) allow(view).to receive(:current_user).and_return(user) - allow(view).to receive(:can?).and_return(true) + allow(view).to receive(:can?).with(user, :push_code, project).and_return(true) + allow(view).to receive(:can_collaborate_with_project?).and_return(true) end context 'empty repository' do diff --git a/spec/views/projects/tree/show.html.haml_spec.rb b/spec/views/projects/tree/show.html.haml_spec.rb index 6fa878eceaf..3b098320ad7 100644 --- a/spec/views/projects/tree/show.html.haml_spec.rb +++ b/spec/views/projects/tree/show.html.haml_spec.rb @@ -12,7 +12,6 @@ describe 'projects/tree/show' do assign(:lfs_blob_ids, []) allow(view).to receive(:can?).and_return(true) - allow(view).to receive(:can_contribute_to_project?).and_return(true) allow(view).to receive(:can_collaborate_with_project?).and_return(true) allow(view).to receive_message_chain('user_access.can_push_to_branch?').and_return(true) allow(view).to receive(:current_application_settings).and_return(Gitlab::CurrentSettings.current_application_settings) |