gitlab-org--gitlab-foss/spec/support/api/repositories_shared_context.rb
2018-07-09 21:13:08 +08:00

10 lines
353 B
Ruby

shared_context 'disabled repository' do
before do
project.project_feature.update!(
repository_access_level: ProjectFeature::DISABLED,
merge_requests_access_level: ProjectFeature::DISABLED,
builds_access_level: ProjectFeature::DISABLED
)
expect(project.feature_available?(:repository, current_user)).to be false
end
end