summaryrefslogtreecommitdiff
path: root/spec/requests/api/internal_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/api/internal_spec.rb')
-rw-r--r--spec/requests/api/internal_spec.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb
index 91202244227..a3798c8cd6c 100644
--- a/spec/requests/api/internal_spec.rb
+++ b/spec/requests/api/internal_spec.rb
@@ -337,7 +337,8 @@ describe API::Internal, api: true do
context 'ssh access has been disabled' do
before do
- stub_application_setting(enabled_git_access_protocol: 'http')
+ settings = ::ApplicationSetting.create_from_defaults
+ settings.update_attribute(:enabled_git_access_protocol, 'http')
end
it 'rejects the SSH push' do
@@ -359,7 +360,8 @@ describe API::Internal, api: true do
context 'http access has been disabled' do
before do
- stub_application_setting(enabled_git_access_protocol: 'ssh')
+ settings = ::ApplicationSetting.create_from_defaults
+ settings.update_attribute(:enabled_git_access_protocol, 'ssh')
end
it 'rejects the HTTP push' do
@@ -381,7 +383,8 @@ describe API::Internal, api: true do
context 'web actions are always allowed' do
it 'allows WEB push' do
- stub_application_setting(enabled_git_access_protocol: 'ssh')
+ settings = ::ApplicationSetting.create_from_defaults
+ settings.update_attribute(:enabled_git_access_protocol, 'ssh')
project.team << [user, :developer]
push(key, project, 'web')