summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-10-07 19:19:23 +0200
committerDouwe Maan <douwe@gitlab.com>2015-10-07 19:19:23 +0200
commit72afcbcd37f35e02544290977c2c91ae37c12c01 (patch)
tree71256f67f04a70b5b2fdff6ca99895341d2b9641 /spec/support
parentf42cfa9e8757161414f88e50d23b1d618bffad1f (diff)
downloadgitlab-ce-72afcbcd37f35e02544290977c2c91ae37c12c01.tar.gz
Always allow references to the current project
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/mentionable_shared_examples.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/support/mentionable_shared_examples.rb b/spec/support/mentionable_shared_examples.rb
index e3de0afb448..2b52b4c9b10 100644
--- a/spec/support/mentionable_shared_examples.rb
+++ b/spec/support/mentionable_shared_examples.rb
@@ -50,6 +50,8 @@ def common_mentionable_setup
}
extra_commits.each { |c| commitmap[c.short_id] = c }
+ allow(Project).to receive(:find).and_call_original
+ allow(Project).to receive(:find).with(project.id.to_s).and_return(project)
allow(project.repository).to receive(:commit) { |sha| commitmap[sha] }
set_mentionable_text.call(ref_string)