diff options
author | Dongqing Hu <sorra@outlook.com> | 2017-01-31 17:42:54 +0300 |
---|---|---|
committer | Dongqing Hu <sorra@outlook.com> | 2017-01-31 17:42:54 +0300 |
commit | bbbef273f74a59a18cf534e147e79e90888d7656 (patch) | |
tree | 1e82324ff59b504708909cb3950239a2663ab9fa /spec/models | |
parent | 821ab7cf7dc45932167986005013044e346c8823 (diff) |
Remove MergeRequest#closes_issue?; Remove the default parameter value for #cache_merge_request_closes_issues! and #issues_mentioned_but_not_closing
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/merge_request_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 861426acbc3..cfb5ff0ff8b 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -97,7 +97,7 @@ describe MergeRequest, models: true do commit = double('commit1', safe_message: "Fixes #{issue.to_reference}") allow(subject).to receive(:commits).and_return([commit]) - expect { subject.cache_merge_request_closes_issues! }.to change(subject.merge_requests_closing_issues, :count).by(1) + expect { subject.cache_merge_request_closes_issues!(subject.author) }.to change(subject.merge_requests_closing_issues, :count).by(1) end it 'does not cache issues from external trackers' do @@ -106,7 +106,7 @@ describe MergeRequest, models: true do commit = double('commit1', safe_message: "Fixes #{issue.to_reference}") allow(subject).to receive(:commits).and_return([commit]) - expect { subject.cache_merge_request_closes_issues! }.not_to change(subject.merge_requests_closing_issues, :count) + expect { subject.cache_merge_request_closes_issues!(subject.author) }.not_to change(subject.merge_requests_closing_issues, :count) end end @@ -300,7 +300,7 @@ describe MergeRequest, models: true do allow(subject.project).to receive(:default_branch). and_return(subject.target_branch) - expect(subject.issues_mentioned_but_not_closing).to match_array([mentioned_issue]) + expect(subject.issues_mentioned_but_not_closing(subject.author)).to match_array([mentioned_issue]) end end |