diff options
author | Stan Hu <stanhu@gmail.com> | 2019-02-15 16:58:23 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-02-15 16:58:23 +0300 |
commit | 886f00bcba23d67e2c86591c2eb5359ef457a2f9 (patch) | |
tree | 0ee446afb776d14433abd83b8e366517a976d867 /spec/models/commit_collection_spec.rb | |
parent | d9328cb3e3c4e71b02e2a1ceb304997ddebd6fdd (diff) |
Backport commit author changes from CE
This backports the changes made in EE to fix merge request approvers
from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9574.
Diffstat (limited to 'spec/models/commit_collection_spec.rb')
-rw-r--r-- | spec/models/commit_collection_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/models/commit_collection_spec.rb b/spec/models/commit_collection_spec.rb index 12e59b35428..0f5d03ff458 100644 --- a/spec/models/commit_collection_spec.rb +++ b/spec/models/commit_collection_spec.rb @@ -12,26 +12,26 @@ describe CommitCollection do end end - describe '.committers' do + describe '.authors' do it 'returns a relation of users when users are found' do - user = create(:user, email: commit.committer_email.upcase) + user = create(:user, email: commit.author_email.upcase) collection = described_class.new(project, [commit]) - expect(collection.committers).to contain_exactly(user) + expect(collection.authors).to contain_exactly(user) end - it 'returns empty array when committers cannot be found' do + it 'returns empty array when authors cannot be found' do collection = described_class.new(project, [commit]) - expect(collection.committers).to be_empty + expect(collection.authors).to be_empty end it 'excludes authors of merge commits' do commit = project.commit("60ecb67744cb56576c30214ff52294f8ce2def98") - create(:user, email: commit.committer_email.upcase) + create(:user, email: commit.author_email.upcase) collection = described_class.new(project, [commit]) - expect(collection.committers).to be_empty + expect(collection.authors).to be_empty end end |