diff options
author | Nick Thomas <nick@gitlab.com> | 2018-09-18 12:04:15 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-09-18 14:04:49 +0300 |
commit | 5a883915793f0f89f850d5393dce497ff9c5f893 (patch) | |
tree | 14a8e12d7554affbd48b29bc2e8efec082cbb128 /spec/services/files | |
parent | 12f9879295ac9abdd0d6aff47cc3828c9ca36dc7 (diff) |
Guard against regressions in commit email specs
Diffstat (limited to 'spec/services/files')
-rw-r--r-- | spec/services/files/create_service_spec.rb | 1 | ||||
-rw-r--r-- | spec/services/files/delete_service_spec.rb | 3 | ||||
-rw-r--r-- | spec/services/files/update_service_spec.rb | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/spec/services/files/create_service_spec.rb b/spec/services/files/create_service_spec.rb index c8f899e6dff..751b7160276 100644 --- a/spec/services/files/create_service_spec.rb +++ b/spec/services/files/create_service_spec.rb @@ -84,6 +84,7 @@ describe Files::CreateService do it 'uses the commit email' do subject.execute + expect(user.commit_email).not_to eq(user.email) expect(commit.author_email).to eq(user.commit_email) expect(commit.committer_email).to eq(user.commit_email) end diff --git a/spec/services/files/delete_service_spec.rb b/spec/services/files/delete_service_spec.rb index ba4a0594666..309802ce733 100644 --- a/spec/services/files/delete_service_spec.rb +++ b/spec/services/files/delete_service_spec.rb @@ -4,7 +4,7 @@ describe Files::DeleteService do subject { described_class.new(project, user, commit_params) } let(:project) { create(:project, :repository) } - let(:user) { create(:user) } + let(:user) { create(:user, :commit_email) } let(:file_path) { 'files/ruby/popen.rb' } let(:branch_name) { project.default_branch } let(:last_commit_sha) { nil } @@ -39,6 +39,7 @@ describe Files::DeleteService do it 'uses the commit email' do subject.execute + expect(user.commit_email).not_to eq(user.email) expect(commit.author_email).to eq(user.commit_email) expect(commit.committer_email).to eq(user.commit_email) end diff --git a/spec/services/files/update_service_spec.rb b/spec/services/files/update_service_spec.rb index 3bfa2717960..23db35c2418 100644 --- a/spec/services/files/update_service_spec.rb +++ b/spec/services/files/update_service_spec.rb @@ -4,7 +4,7 @@ describe Files::UpdateService do subject { described_class.new(project, user, commit_params) } let(:project) { create(:project, :repository) } - let(:user) { create(:user) } + let(:user) { create(:user, :commit_email) } let(:file_path) { 'files/ruby/popen.rb' } let(:new_contents) { 'New Content' } let(:branch_name) { project.default_branch } @@ -59,6 +59,7 @@ describe Files::UpdateService do it 'uses the commit email' do subject.execute + expect(user.commit_email).not_to eq(user.email) expect(commit.author_email).to eq(user.commit_email) expect(commit.committer_email).to eq(user.commit_email) end |