diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-17 20:40:26 -0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 12:13:46 +0200 |
commit | 213d1a4768b4bb83aa1ca827682468c381cbe9c9 (patch) | |
tree | 0c161eb0ba800cafce679dd42de03695b3388435 /spec/models | |
parent | 15133d99ded86b08e7d549ca1e2dff6dbd8de68d (diff) | |
download | gitlab-ce-213d1a4768b4bb83aa1ca827682468c381cbe9c9.tar.gz |
Use to_reference for issue and merge request mentionable specs
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/issue_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/merge_request_spec.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 614b648bb52..9bac451c28c 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -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 diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 73536b6ae96..76f6d8c54c4 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -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 |