summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2015-10-22 18:38:00 +0200
committerValery Sizov <valery@gitlab.com>2015-10-22 18:38:00 +0200
commit95df86638d364a87469550cce852871634ace262 (patch)
tree976d404874ff0b47e6bd779164d115fa79461a58 /spec
parentb97977afef26e8aaad9228c8c7dffecdbe1a8e59 (diff)
downloadgitlab-ce-95df86638d364a87469550cce852871634ace262.tar.gz
Fix: Inability to reply to code comments in the MR view, if the MR comes from a forkcomments_fix
Diffstat (limited to 'spec')
-rw-r--r--spec/models/merge_request_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index 6aaf1c036b0..eed2cbc5412 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -79,6 +79,12 @@ describe MergeRequest do
expect(merge_request.commits).not_to be_empty
expect(merge_request.mr_and_commit_notes.count).to eq(2)
end
+
+ it "should include notes for commits from target project as well" do
+ create(:note, commit_id: merge_request.commits.first.id, noteable_type: 'Commit', project: merge_request.target_project)
+ expect(merge_request.commits).not_to be_empty
+ expect(merge_request.mr_and_commit_notes.count).to eq(3)
+ end
end
describe '#is_being_reassigned?' do