summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorRobin Bobbitt <ryehle@us.ibm.com>2017-07-31 17:34:47 -0400
committerRobin Bobbitt <ryehle@us.ibm.com>2017-08-11 12:22:37 -0400
commit649d042dbc9e2bfda96bb98b0eabd4b00ea2daff (patch)
tree515865c4aadfcb2cda51501ac5c8cd664d805708 /spec/views
parent7633945c27891aa84c45735f14535462b8a54641 (diff)
downloadgitlab-ce-649d042dbc9e2bfda96bb98b0eabd4b00ea2daff.tar.gz
Add option to disable project export on instance
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/edit.html.haml_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/views/projects/edit.html.haml_spec.rb b/spec/views/projects/edit.html.haml_spec.rb
index 94899e26292..1af422941d7 100644
--- a/spec/views/projects/edit.html.haml_spec.rb
+++ b/spec/views/projects/edit.html.haml_spec.rb
@@ -11,14 +11,26 @@ describe 'projects/edit' do
allow(controller).to receive(:current_user).and_return(user)
allow(view).to receive_messages(current_user: user, can?: true)
- allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
end
context 'LFS enabled setting' do
it 'displays the correct elements' do
+ allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
+
render
+
expect(rendered).to have_select('project_lfs_enabled')
expect(rendered).to have_content('Git Large File Storage')
end
end
+
+ context 'project export disabled' do
+ it 'does not display the project export option' do
+ stub_application_setting(project_export_enabled?: false)
+
+ render
+
+ expect(rendered).not_to have_content('Export project')
+ end
+ end
end