diff options
author | Robert Speicher <robert@gitlab.com> | 2017-01-20 15:42:54 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-01-20 15:42:54 +0000 |
commit | 9cac0317696cf47beb77bab28a914411b09ff26c (patch) | |
tree | a149c8d9130a1ec3fbcb7284f42ae7ad965ca5fc /spec/requests | |
parent | 029b9019167b3a67e628e609f2cc141052a99a98 (diff) | |
parent | f6cc29ed83921c3dce98d8c519c4826e7cc8221a (diff) | |
download | gitlab-ce-9cac0317696cf47beb77bab28a914411b09ff26c.tar.gz |
Merge branch 'dont-persist-application-settings-in-test-env' into 'master'
Don't persist application settings in test env
See merge request !8573
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/internal_spec.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/requests/api/internal_spec.rb b/spec/requests/api/internal_spec.rb index a3798c8cd6c..91202244227 100644 --- a/spec/requests/api/internal_spec.rb +++ b/spec/requests/api/internal_spec.rb @@ -337,8 +337,7 @@ describe API::Internal, api: true do context 'ssh access has been disabled' do before do - settings = ::ApplicationSetting.create_from_defaults - settings.update_attribute(:enabled_git_access_protocol, 'http') + stub_application_setting(enabled_git_access_protocol: 'http') end it 'rejects the SSH push' do @@ -360,8 +359,7 @@ describe API::Internal, api: true do context 'http access has been disabled' do before do - settings = ::ApplicationSetting.create_from_defaults - settings.update_attribute(:enabled_git_access_protocol, 'ssh') + stub_application_setting(enabled_git_access_protocol: 'ssh') end it 'rejects the HTTP push' do @@ -383,8 +381,7 @@ describe API::Internal, api: true do context 'web actions are always allowed' do it 'allows WEB push' do - settings = ::ApplicationSetting.create_from_defaults - settings.update_attribute(:enabled_git_access_protocol, 'ssh') + stub_application_setting(enabled_git_access_protocol: 'ssh') project.team << [user, :developer] push(key, project, 'web') |