diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-20 06:06:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-20 06:06:28 +0300 |
commit | 0ecdcf59f4342de55a7d2c3ee4ac0d9c3b116aa5 (patch) | |
tree | 07b26906534f336e9dcd708afbeef8612d1c93f2 /spec/models/merge_request_diff_spec.rb | |
parent | 5a3f1ba53bf875a73f800909e8559d15dfab4339 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/merge_request_diff_spec.rb')
-rw-r--r-- | spec/models/merge_request_diff_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/models/merge_request_diff_spec.rb b/spec/models/merge_request_diff_spec.rb index 0f7f68e0b38..b5404658a69 100644 --- a/spec/models/merge_request_diff_spec.rb +++ b/spec/models/merge_request_diff_spec.rb @@ -98,6 +98,12 @@ describe MergeRequestDiff do end it { is_expected.to contain_exactly(outdated.id, latest.id, closed.id, merged.id, closed_recently.id, merged_recently.id) } + + it 'ignores diffs with 0 files' do + MergeRequestDiffFile.where(merge_request_diff_id: [closed_recently.id, merged_recently.id]).delete_all + + is_expected.to contain_exactly(outdated.id, latest.id, closed.id, merged.id) + end end context 'external diffs are enabled for outdated diffs' do |