Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Duncalfe <lduncalfe@eml.cc>2019-03-15 01:49:28 +0300
committerLuke Duncalfe <lduncalfe@eml.cc>2019-03-22 00:26:16 +0300
commit33ca9d6515e1337858028006a32c3f6fa6717452 (patch)
tree65accc306aae23687a153dcce651bbaef34a7bf8 /spec/models/merge_request_spec.rb
parent38bf176c3cf7b26233ad78103a04546445348983 (diff)
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.
Diffstat (limited to 'spec/models/merge_request_spec.rb')
-rw-r--r--spec/models/merge_request_spec.rb4
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