2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
require 'spec_helper'
|
2018-10-15 14:42:47 +05:30
|
|
|
|
2023-03-04 22:38:38 +05:30
|
|
|
RSpec.describe 'Projects > Settings > LFS settings', feature_category: :projects do
|
2018-10-15 14:42:47 +05:30
|
|
|
let(:project) { create(:project) }
|
|
|
|
let(:user) { create(:user) }
|
2018-11-18 11:00:15 +05:30
|
|
|
let(:role) { :maintainer }
|
2018-10-15 14:42:47 +05:30
|
|
|
|
|
|
|
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
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
context 'for maintainer' do
|
|
|
|
let(:role) { :maintainer }
|
2018-10-15 14:42:47 +05:30
|
|
|
|
|
|
|
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
|