diff options
author | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-10-25 11:09:53 +0100 |
---|---|---|
committer | Tiago Botelho <tiagonbotelho@hotmail.com> | 2018-10-25 11:36:26 +0100 |
commit | 679d9b21b7aac55796ef59d5694b7d2e0fb40b35 (patch) | |
tree | 0ce28ce2326a231aa2c65d324dea9168c17b024d /spec/workers | |
parent | f8ee07d9ee6d01b255902ad976a07beef59a95fb (diff) | |
download | gitlab-ce-679d9b21b7aac55796ef59d5694b7d2e0fb40b35.tar.gz |
Removes idenfitication by commit from Gitlab::Identifier51335-fail-early-when-user-cannot-be-identified
Before we would need to identify a user when pushing
through the GitLab UI. Since this is no longer the case
we can remove the identification by commit and instead,
use the identify_using_user
Diffstat (limited to 'spec/workers')
-rw-r--r-- | spec/workers/post_receive_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/workers/post_receive_spec.rb b/spec/workers/post_receive_spec.rb index 1184bd9492a..9176eb12b12 100644 --- a/spec/workers/post_receive_spec.rb +++ b/spec/workers/post_receive_spec.rb @@ -41,6 +41,17 @@ describe PostReceive do end end + context 'unidentified user' do + let!(:key_id) { "" } + + it 'returns false' do + expect(GitPushService).not_to receive(:new) + expect(GitTagPushService).not_to receive(:new) + + expect(described_class.new.perform(gl_repository, key_id, base64_changes)).to be false + end + end + context 'with changes' do before do allow_any_instance_of(Gitlab::GitPostReceive).to receive(:identify).and_return(project.owner) |