diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-01 07:28:43 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-01 07:28:50 +0000 |
commit | 7a9764bb646d28cf3e403be6c4cfe5875b1e9a44 (patch) | |
tree | 13286eeee649d8df949383df81af9a041f6d4c33 /spec | |
parent | 37f194bbc19045abe013a58274494c1a6c8bbdd5 (diff) | |
download | gitlab-ce-7a9764bb646d28cf3e403be6c4cfe5875b1e9a44.tar.gz |
Add latest changes from gitlab-org/security/gitlab@15-0-stable-ee
Diffstat (limited to 'spec')
-rw-r--r-- | spec/services/ci/pipeline_trigger_service_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/services/ci/pipeline_trigger_service_spec.rb b/spec/services/ci/pipeline_trigger_service_spec.rb index a794dedc658..4b3e774ff3c 100644 --- a/spec/services/ci/pipeline_trigger_service_spec.rb +++ b/spec/services/ci/pipeline_trigger_service_spec.rb @@ -56,6 +56,15 @@ RSpec.describe Ci::PipelineTriggerService do end end + context 'when trigger owner does not have a permission to read a project' do + let(:params) { { token: trigger.token, ref: 'master', variables: nil } } + let(:trigger) { create(:ci_trigger, project: project, owner: create(:user)) } + + it 'does nothing' do + expect { result }.not_to change { Ci::Pipeline.count } + end + end + context 'when params have an existing trigger token' do context 'when params have an existing ref' do let(:params) { { token: trigger.token, ref: 'master', variables: nil } } |