From c8a115c0e3a9c8242c2a422572d47a49e0cb2874 Mon Sep 17 00:00:00 2001 From: ash wilson Date: Thu, 30 May 2013 23:16:49 +0000 Subject: Link issues from comments and automatically close them Any mention of Issues, MergeRequests, or Commits via GitLab-flavored markdown references in descriptions, titles, or attached Notes creates a back-reference Note that links to the original referencer. Furthermore, pushing commits with commit messages that match a (configurable) regexp to a project's default branch will close any issues mentioned by GFM in the matched closing phrase. If accepting a merge request would close any Issues in this way, a banner is appended to the merge request's main panel to indicate this. --- spec/models/issue_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/models/issue_spec.rb') diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index c10891331b1..75155d5dc1d 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -56,4 +56,10 @@ describe Issue do Issue.open_for(user).count.should eq 2 end end + + it_behaves_like 'an editable mentionable' do + let(:subject) { create :issue, project: mproject } + let(:backref_text) { "issue ##{subject.iid}" } + let(:set_mentionable_text) { ->(txt){ subject.description = txt } } + end end -- cgit v1.2.3