summaryrefslogtreecommitdiff
path: root/spec/factories/merge_requests.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-08-09 21:41:45 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-08-09 21:41:45 +0800
commit412db1874fbf2847ad9d84e9d2344d4c4d4b9fef (patch)
tree24b39366555209a0db724d9b4eb49fff4fe2e620 /spec/factories/merge_requests.rb
parenta85eed6446fa0b4b899a71cb9a3cb5e011a41c3a (diff)
downloadgitlab-ce-412db1874fbf2847ad9d84e9d2344d4c4d4b9fef.tar.gz
Fix some tests and report the error message
Diffstat (limited to 'spec/factories/merge_requests.rb')
-rw-r--r--spec/factories/merge_requests.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/factories/merge_requests.rb b/spec/factories/merge_requests.rb
index 19bf7582747..04493981945 100644
--- a/spec/factories/merge_requests.rb
+++ b/spec/factories/merge_requests.rb
@@ -70,10 +70,11 @@ FactoryGirl.define do
after(:build) do |merge_request|
target_project = merge_request.target_project
+ source_project = merge_request.source_project
# Fake `fetch_ref` if we don't have repository
# We have too many existing tests replying on this behaviour
- unless target_project.repository_exists?
+ unless [target_project, source_project].all?(&:repository_exists?)
allow(target_project.repository).to receive(:fetch_ref)
end
end