summaryrefslogtreecommitdiff
path: root/spec/workers/post_receive_spec.rb
diff options
context:
space:
mode:
authorTiago Botelho <tiagonbotelho@hotmail.com>2018-10-25 11:09:53 +0100
committerTiago Botelho <tiagonbotelho@hotmail.com>2018-10-25 11:36:26 +0100
commit679d9b21b7aac55796ef59d5694b7d2e0fb40b35 (patch)
tree0ce28ce2326a231aa2c65d324dea9168c17b024d /spec/workers/post_receive_spec.rb
parentf8ee07d9ee6d01b255902ad976a07beef59a95fb (diff)
downloadgitlab-ce-51335-fail-early-when-user-cannot-be-identified.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/post_receive_spec.rb')
-rw-r--r--spec/workers/post_receive_spec.rb11
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)