diff options
author | Luke Duncalfe <lduncalfe@eml.cc> | 2019-03-15 11:49:28 +1300 |
---|---|---|
committer | Luke Duncalfe <lduncalfe@eml.cc> | 2019-03-18 13:03:23 +1300 |
commit | 0420c2393beff2dcf045c9eff12ec44b13759c14 (patch) | |
tree | bbca78040a76c4622f7285125df9ecbbc05fb820 | |
parent | 8ef0a9d5cae654eb6d5515f776bf7eb519327915 (diff) | |
download | gitlab-ce-0420c2393beff2dcf045c9eff12ec44b13759c14.tar.gz |
Scope out merge commits in MergeRequest spec
Previously the code for excluding merge commits from the commit
collection (CommitCollection#without_merge_commits) was not working
when the commits had come from a merge request. Now that this has been
fixed, these tests fails. They should always have been written to
exclude merge commits when comparing.
-rw-r--r-- | spec/models/merge_request_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index c487ae45ceb..fad73613989 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -1040,7 +1040,7 @@ describe MergeRequest do describe '#commit_authors' do it 'returns all the authors of every commit in the merge request' do - users = subject.commits.map(&:author_email).uniq.map do |email| + users = subject.commits.without_merge_commits.map(&:author_email).uniq.map do |email| create(:user, email: email) end @@ -1054,7 +1054,7 @@ describe MergeRequest do describe '#authors' do it 'returns a list with all the commit authors in the merge request and author' do - users = subject.commits.map(&:author_email).uniq.map do |email| + users = subject.commits.without_merge_commits.map(&:author_email).uniq.map do |email| create(:user, email: email) end |