diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-27 00:10:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-27 00:10:25 +0300 |
commit | 70cfa5e3e7e6765590a664165eac0ef00c3d05dc (patch) | |
tree | 52216b5c0b72688f14dc5b481bc86a7eb9d0acb4 /spec/services | |
parent | e7e40d45b066139707b3b851c6004e075da5226b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/ci/destroy_pipeline_service_spec.rb | 3 | ||||
-rw-r--r-- | spec/services/ci/expire_pipeline_cache_service_spec.rb | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/services/ci/destroy_pipeline_service_spec.rb b/spec/services/ci/destroy_pipeline_service_spec.rb index 0a68f387e65..f226a129fac 100644 --- a/spec/services/ci/destroy_pipeline_service_spec.rb +++ b/spec/services/ci/destroy_pipeline_service_spec.rb @@ -24,6 +24,9 @@ RSpec.describe ::Ci::DestroyPipelineService do subject + # We need to reset lazy_latest_pipeline cache to simulate a new request + BatchLoader::Executor.clear_current + # Need to use find to avoid memoization expect(Project.find(project.id).pipeline_status.has_status?).to be_falsey end diff --git a/spec/services/ci/expire_pipeline_cache_service_spec.rb b/spec/services/ci/expire_pipeline_cache_service_spec.rb index 0c9b7635392..ca37496657a 100644 --- a/spec/services/ci/expire_pipeline_cache_service_spec.rb +++ b/spec/services/ci/expire_pipeline_cache_service_spec.rb @@ -60,6 +60,9 @@ RSpec.describe Ci::ExpirePipelineCacheService do pipeline_with_commit.destroy! + # We need to reset lazy_latest_pipeline cache to simulate a new request + BatchLoader::Executor.clear_current + # Need to use find to avoid memoization expect(Project.find(project_with_repo.id).pipeline_status.has_status?).to be_falsey end |