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:
Diffstat (limited to 'spec/lib/gitlab/auth/auth_finders_spec.rb')
-rw-r--r--spec/lib/gitlab/auth/auth_finders_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/lib/gitlab/auth/auth_finders_spec.rb b/spec/lib/gitlab/auth/auth_finders_spec.rb
index e2226952d15..05eca4cf70f 100644
--- a/spec/lib/gitlab/auth/auth_finders_spec.rb
+++ b/spec/lib/gitlab/auth/auth_finders_spec.rb
@@ -89,12 +89,13 @@ RSpec.describe Gitlab::Auth::AuthFinders do
context 'with a running job' do
let(:token) { job.token }
- if without_job_token_allowed == :error
+ case without_job_token_allowed
+ when :error
it 'returns an Unauthorized exception' do
expect { subject }.to raise_error(Gitlab::Auth::UnauthorizedError)
expect(@current_authenticated_job).to be_nil
end
- elsif without_job_token_allowed == :user
+ when :user
it 'returns the user' do
expect(subject).to eq(user)
expect(@current_authenticated_job).to eq job