564050ec0f
LFS can be enabled and disabled per project using the API by Masters and Owners, but the UI is only available to Admins. The interface and API should be consistent. LFS can also be enabled and disabled per group using the API by Owners, but the UI is only available to Admins. This interface should also be consistent. Additionally removes an unneeded check if 2FA interface, since the interface is only available to Owners. Closes #33320
27 lines
690 B
Ruby
27 lines
690 B
Ruby
require 'rails_helper'
|
|
|
|
describe 'Projects > Settings > LFS settings' do
|
|
let(:project) { create(:project) }
|
|
let(:user) { create(:user) }
|
|
let(:role) { :master }
|
|
|
|
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 master' do
|
|
let(:role) { :master }
|
|
|
|
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
|