diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-15 06:09:11 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-15 06:09:11 +0000 |
commit | a7d1525878904f2f8326baf1c8108f2204ac50cb (patch) | |
tree | da855edafb086adebe33c5eed462d753b58e2836 /spec/services | |
parent | b69f406585ff64b1c5140ebba775cc754fabb358 (diff) | |
download | gitlab-ce-a7d1525878904f2f8326baf1c8108f2204ac50cb.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/ci/stop_environments_service_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/services/ci/stop_environments_service_spec.rb b/spec/services/ci/stop_environments_service_spec.rb index 88f2f5618c2..19a6bcc307f 100644 --- a/spec/services/ci/stop_environments_service_spec.rb +++ b/spec/services/ci/stop_environments_service_spec.rb @@ -217,18 +217,20 @@ describe Ci::StopEnvironmentsService do context 'when user does not have a permission to play the stop action' do before do - Ci::Build.find_by_ref('review/feature-2').update_column(:user_id, nil) + project.team.truncate end it 'tracks the exception' do - deployable = Ci::Build.find_by_ref('review/feature-2') - expect(Gitlab::ErrorTracking) .to receive(:track_error) - .with(Gitlab::Access::AccessDeniedError, deployable_id: deployable.id).once + .with(Gitlab::Access::AccessDeniedError, anything).twice subject end + + after do + project.add_developer(user) + end end end |