summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-11-23 20:48:53 +0000
committerStan Hu <stanhu@gmail.com>2016-11-23 20:48:53 +0000
commitc5917689077df7fda42bd87862981b93f823aa9f (patch)
treecbc8fa53c7b13a4b05e6881f7c51d880a7086ba6 /spec
parent672dcce21d8913fce6031132011f2c93e7650de1 (diff)
parent7a9b545fb9c443cef1a3bb6394223e6bbe0cef9a (diff)
downloadgitlab-ce-c5917689077df7fda42bd87862981b93f823aa9f.tar.gz
Merge branch 'fix-lfs-enabled-select-box' into 'master'
Fix `LFS enabled` select box. A refactor of the project edit page caused the `lfs_enabled` setting to be reverted to a non functioning state. This MR fixes that. This will most likely need to be ported back to 8.13 and 8.14. 8.12 contained the correct code. Fixes #24645 Related commits: - ea3bbbdef86ae30fcf76baaba11a3fceb6d2aa03 - da07c2e4d3d382c05ec287ee60f639b870074fe7 cc @stanhu @dblessing @dbalexandre @rymai See merge request !7716
Diffstat (limited to 'spec')
-rw-r--r--spec/views/projects/edit.html.haml_spec.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/views/projects/edit.html.haml_spec.rb b/spec/views/projects/edit.html.haml_spec.rb
new file mode 100644
index 00000000000..d2575702ecc
--- /dev/null
+++ b/spec/views/projects/edit.html.haml_spec.rb
@@ -0,0 +1,24 @@
+require 'spec_helper'
+
+describe 'projects/edit' do
+ include Devise::Test::ControllerHelpers
+
+ let(:project) { create(:empty_project) }
+ let(:user) { create(:admin) }
+
+ before do
+ assign(:project, project)
+
+ 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
+ render
+ expect(rendered).to have_select('project_lfs_enabled')
+ expect(rendered).to have_content('Git Large File Storage')
+ end
+ end
+end