summaryrefslogtreecommitdiff
path: root/spec/factories/merge_requests.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2018-07-30 15:52:42 -0300
committerFelipe Artur <felipefac@gmail.com>2018-08-06 11:58:22 -0300
commitfdb5f285f924e653400f7bbe18d13718c469d74f (patch)
tree3570730544d21c8d463aed792e9adcd686ea436a /spec/factories/merge_requests.rb
parentcb2e07309b4e61501a44c3568155bdb73252338f (diff)
downloadgitlab-ce-fdb5f285f924e653400f7bbe18d13718c469d74f.tar.gz
Retrieve merge request closing issues from database cache
Diffstat (limited to 'spec/factories/merge_requests.rb')
-rw-r--r--spec/factories/merge_requests.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb
index f722bb9cb0d..f3bea17385b 100644
--- a/spec/factories/merge_requests.rb
+++ b/spec/factories/merge_requests.rb
@@ -100,6 +100,10 @@ FactoryBot.define do
end
end
+ after(:create) do |merge_request, evaluator|
+ merge_request.cache_merge_request_closes_issues!
+ end
+
factory :merged_merge_request, traits: [:merged]
factory :closed_merge_request, traits: [:closed]
factory :reopened_merge_request, traits: [:opened]