gitlab-org--gitlab-foss/spec/features/projects/settings/lfs_settings_spec.rb
Ash McKenzie 19ff9d9899
Replace rails_helper.rb with spec_helper.rb
rails_helper.rb's only logic was to require
spec_helper.rb.
2019-08-30 12:26:18 +10:00

29 lines
732 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe 'Projects > Settings > LFS settings' do
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:role) { :maintainer }
context 'LFS enabled setting' do
before do
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
sign_in(user)
project.add_role(user, role)
end
context 'for maintainer' do
let(:role) { :maintainer }
it 'displays the correct elements', :js do
visit edit_project_path(project)
expect(page).to have_content('Git Large File Storage')
expect(page).to have_selector('input[name="project[lfs_enabled]"] + button', visible: true)
end
end
end
end