gitlab-org--gitlab-foss/spec/support/api/repositories_shared_context.rb
Rémy Coutable 0349e83aa7 Improve specs for Files API
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-20 16:11:10 +01:00

10 lines
364 B
Ruby

shared_context 'disabled repository' do
before do
project.project_feature.update_attributes!(
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