Fix mentionable spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
f0de4b539f
commit
9231b91a40
|
@ -11,7 +11,7 @@ def common_mentionable_setup
|
|||
|
||||
let(:mentioned_issue) { create :issue, project: mproject }
|
||||
let(:other_issue) { create :issue, project: mproject }
|
||||
let(:mentioned_mr) { create :merge_request, source_project: mproject, source_branch: 'different' }
|
||||
let(:mentioned_mr) { create :merge_request, :simple, source_project: mproject }
|
||||
let(:mentioned_commit) { double('commit', sha: '1234567890abcdef').as_null_object }
|
||||
|
||||
# Override to add known commits to the repository stub.
|
||||
|
@ -29,11 +29,7 @@ def common_mentionable_setup
|
|||
# unrecognized commits.
|
||||
commitmap = { '123456' => mentioned_commit }
|
||||
extra_commits.each { |c| commitmap[c.sha[0..5]] = c }
|
||||
|
||||
repo = double('repository')
|
||||
repo.stub(:commit) { |sha| commitmap[sha] }
|
||||
mproject.stub(repository: repo)
|
||||
|
||||
mproject.repository.stub(:commit) { |sha| commitmap[sha] }
|
||||
set_mentionable_text.call(ref_string)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue