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/git_access_spec.rb')
-rw-r--r--spec/lib/gitlab/git_access_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb
index 10a099af4f0..ea2c239df07 100644
--- a/spec/lib/gitlab/git_access_spec.rb
+++ b/spec/lib/gitlab/git_access_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe Gitlab::GitAccess, :aggregate_failures do
+RSpec.describe Gitlab::GitAccess, :aggregate_failures, feature_category: :authentication_and_authorization do
include TermsHelper
include AdminModeHelper
include ExternalAuthorizationServiceHelpers
@@ -113,9 +113,9 @@ RSpec.describe Gitlab::GitAccess, :aggregate_failures do
end
end
- context 'when the external_authorization_service is enabled' do
+ context 'when the the deploy key is restricted with external_authorization' do
before do
- stub_application_setting(external_authorization_service_enabled: true)
+ allow(Gitlab::ExternalAuthorization).to receive(:allow_deploy_tokens_and_deploy_keys?).and_return(false)
end
it 'blocks push and pull with "not found"' do
@@ -191,9 +191,9 @@ RSpec.describe Gitlab::GitAccess, :aggregate_failures do
end
end
- context 'when the external_authorization_service is enabled' do
+ context 'when the the deploy token is restricted with external_authorization' do
before do
- stub_application_setting(external_authorization_service_enabled: true)
+ allow(Gitlab::ExternalAuthorization).to receive(:allow_deploy_tokens_and_deploy_keys?).and_return(false)
end
it 'blocks pull access' do