diff options
Diffstat (limited to 'spec/services/ci/destroy_expired_job_artifacts_service_spec.rb')
-rw-r--r-- | spec/services/ci/destroy_expired_job_artifacts_service_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb b/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb index 4b9f12d8fdf..79443f16276 100644 --- a/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb +++ b/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared_state do +RSpec.describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared_state do include ExclusiveLeaseHelpers describe '.execute' do @@ -14,7 +14,7 @@ describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared_state context 'when artifact is expired' do context 'when artifact is not locked' do before do - artifact.update!(locked: false) + artifact.job.pipeline.unlocked! end it 'destroys job artifact' do @@ -24,7 +24,7 @@ describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared_state context 'when artifact is locked' do before do - artifact.update!(locked: true) + artifact.job.pipeline.artifacts_locked! end it 'does not destroy job artifact' do |