Use to_reference for issue and merge request mentionable specs

This commit is contained in:
Robert Speicher 2015-06-17 20:40:26 -04:00 committed by Dmitriy Zaporozhets
parent 15133d99de
commit 213d1a4768
2 changed files with 4 additions and 4 deletions

View file

@ -70,7 +70,7 @@ describe Issue do
it_behaves_like 'an editable mentionable' do
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 } }
end

View file

@ -165,10 +165,10 @@ describe MergeRequest do
end
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(:set_mentionable_text) { ->(txt){ subject.title = txt } }
let(:backref_text) { "merge request #{subject.to_reference}" }
let(:set_mentionable_text) { ->(txt){ subject.description = txt } }
end
it_behaves_like 'a Taskable' do