2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-08-29 03:56:52 -04:00
|
|
|
require 'spec_helper'
|
2018-04-06 08:40:33 -04:00
|
|
|
|
|
|
|
describe 'Projects > Settings > LFS settings' do
|
|
|
|
let(:project) { create(:project) }
|
2018-04-24 06:51:39 -04:00
|
|
|
let(:user) { create(:user) }
|
2018-07-11 10:36:08 -04:00
|
|
|
let(:role) { :maintainer }
|
2018-04-06 08:40:33 -04:00
|
|
|
|
|
|
|
context 'LFS enabled setting' do
|
|
|
|
before do
|
2018-04-09 13:26:29 -04:00
|
|
|
allow(Gitlab.config.lfs).to receive(:enabled).and_return(true)
|
|
|
|
|
2018-04-24 06:51:39 -04:00
|
|
|
sign_in(user)
|
|
|
|
project.add_role(user, role)
|
2018-04-06 08:40:33 -04:00
|
|
|
end
|
|
|
|
|
2018-07-11 10:36:08 -04:00
|
|
|
context 'for maintainer' do
|
|
|
|
let(:role) { :maintainer }
|
2018-04-06 08:40:33 -04:00
|
|
|
|
2018-04-24 06:51:39 -04:00
|
|
|
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
|
2018-04-06 08:40:33 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|