diff options
Diffstat (limited to 'spec/models/merge_request_spec.rb')
-rw-r--r-- | spec/models/merge_request_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 3932a925086..e7d815414a8 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -4291,8 +4291,11 @@ RSpec.describe MergeRequest, factory_default: :keep, feature_category: :code_rev it 'refreshes the number of open merge requests of the target project' do project = subject.target_project - expect { subject.destroy! } - .to change { project.open_merge_requests_count }.from(1).to(0) + expect do + subject.destroy! + + BatchLoader::Executor.clear_current + end.to change { project.open_merge_requests_count }.from(1).to(0) end end |