diff options
author | Patricio Cano <suprnova32@gmail.com> | 2016-11-23 22:32:38 +0300 |
---|---|---|
committer | Patricio Cano <suprnova32@gmail.com> | 2016-11-23 22:32:38 +0300 |
commit | 7a9b545fb9c443cef1a3bb6394223e6bbe0cef9a (patch) | |
tree | 3954704ddced986afc09323944828be31ad5d352 /spec | |
parent | b7e29af0b51bf39ae3c761b349494719cd860ebe (diff) |
Added test that checks the correct select box is there for the LFS enabled setting.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/views/projects/edit.html.haml_spec.rb | 24 |
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 |