summaryrefslogtreecommitdiff
path: root/spec/models/merge_request_spec.rb
diff options
context:
space:
mode:
authorPaco Guzman <pacoguzmanp@gmail.com>2016-09-29 16:28:45 +0200
committerPaco Guzman <pacoguzmanp@gmail.com>2016-10-04 10:45:48 +0200
commit4ff345c488c993e9f67f34ad271bc98a1f3ffa61 (patch)
treeb695447f54f09f45e1464fea038b4e0500538047 /spec/models/merge_request_spec.rb
parentccd89ec965aa26812b4e48aabc15ca1594914b66 (diff)
downloadgitlab-ce-4ff345c488c993e9f67f34ad271bc98a1f3ffa61.tar.gz
Simplify Mentionable concern instance methods
We remove some arguments that are rarely used or used just to simplify setups on specs. Modified Mentionable#create_new_cross_references method we don’t need to calculate previous references to avoid the duplication because we do that at database level when creating references extracted from the current entity state. MergeRequests won’t create cross_references for commits that are included so we change a spec to use a different merge request to make references to commits to other branches
Diffstat (limited to 'spec/models/merge_request_spec.rb')
-rw-r--r--spec/models/merge_request_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index 9d7be2429ed..c29364466f0 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -522,7 +522,7 @@ describe MergeRequest, models: true do
end
it_behaves_like 'an editable mentionable' do
- subject { create(:merge_request) }
+ subject { create(:merge_request, :simple) }
let(:backref_text) { "merge request #{subject.to_reference}" }
let(:set_mentionable_text) { ->(txt){ subject.description = txt } }