Commit 213d1a47 authored by Robert Speicher's avatar Robert Speicher Committed by Dmitriy Zaporozhets

Use to_reference for issue and merge request mentionable specs

parent 15133d99
...@@ -70,7 +70,7 @@ describe Issue do ...@@ -70,7 +70,7 @@ describe Issue do
it_behaves_like 'an editable mentionable' do it_behaves_like 'an editable mentionable' do
subject { create(:issue, project: project) } subject { create(:issue, project: project) }
let(:backref_text) { "issue ##{subject.iid}" } let(:backref_text) { "issue #{subject.to_reference}" }
let(:set_mentionable_text) { ->(txt){ subject.description = txt } } let(:set_mentionable_text) { ->(txt){ subject.description = txt } }
end end
......
...@@ -165,10 +165,10 @@ describe MergeRequest do ...@@ -165,10 +165,10 @@ describe MergeRequest do
end end
it_behaves_like 'an editable mentionable' do it_behaves_like 'an editable mentionable' do
subject { create(:merge_request, source_project: project, target_project: project) } subject { create(:merge_request, source_project: project) }
let(:backref_text) { "merge request !#{subject.iid}" } let(:backref_text) { "merge request #{subject.to_reference}" }
let(:set_mentionable_text) { ->(txt){ subject.title = txt } } let(:set_mentionable_text) { ->(txt){ subject.description = txt } }
end end
it_behaves_like 'a Taskable' do it_behaves_like 'a Taskable' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment