From b21a2d821a4e16aba1609dfa1e01ba455e8ccd8f Mon Sep 17 00:00:00 2001 From: jubianchi Date: Wed, 17 Sep 2014 19:08:35 +0200 Subject: Allow commit messages to close several issues at once (thanks @123Haynes for his work and help) --- spec/models/commit_spec.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'spec/models/commit_spec.rb') diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index a6ec44da4be..7a2a7a4ce9b 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -57,16 +57,12 @@ eos let(:other_issue) { create :issue, project: other_project } it 'detects issues that this commit is marked as closing' do - stub_const('Gitlab::ClosingIssueExtractor::ISSUE_CLOSING_REGEX', - /Fixes #\d+/) commit.stub(safe_message: "Fixes ##{issue.iid}") commit.closes_issues(project).should == [issue] end it 'does not detect issues from other projects' do ext_ref = "#{other_project.path_with_namespace}##{other_issue.iid}" - stub_const('Gitlab::ClosingIssueExtractor::ISSUE_CLOSING_REGEX', - /^([Cc]loses|[Ff]ixes)/) commit.stub(safe_message: "Fixes #{ext_ref}") commit.closes_issues(project).should be_empty end -- cgit v1.2.1