Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot
2023-04-25 09:18:44 +00:00
parent b7d907c10e
commit af69e63b66
32 changed files with 466 additions and 167 deletions

View File

@ -71,4 +71,26 @@ RSpec.describe ::API::Entities::Project do
end
end
end
describe '.ci/cd settings' do
context 'when the user is not an admin' do
before do
project.add_reporter(current_user)
end
it 'does not return ci settings' do
expect(json[:ci_default_git_depth]).to be_nil
end
end
context 'when the user has admin privileges' do
before do
project.add_maintainer(current_user)
end
it 'returns ci settings' do
expect(json[:ci_default_git_depth]).to be_present
end
end
end
end