diff options
author | Nick Thomas <nick@gitlab.com> | 2018-03-23 18:48:28 +0300 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-03-23 18:48:28 +0300 |
commit | 457a99c612acf59ec9cc4d0793c53465f914e696 (patch) | |
tree | ca474ece3e4db339d225d9789298ee78051848eb /spec/services/projects | |
parent | 79dd74db14ffdac34fa2eff0aa26387b29a16cb5 (diff) | |
parent | 9d45951fcaeda4f01a2e4be2480d980a3e7cd37e (diff) |
Merge branch 'pages_force_https' into 'master'
HTTPS only Pages
Closes #28857
See merge request gitlab-org/gitlab-ce!16273
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/update_service_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index e3b49a6242d..f48d466d263 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -241,6 +241,27 @@ describe Projects::UpdateService do }) end end + + context 'when updating #pages_https_only', :https_pages_enabled do + subject(:call_service) do + update_project(project, admin, pages_https_only: false) + end + + it 'updates the attribute' do + expect { call_service } + .to change { project.pages_https_only? } + .to(false) + end + + it 'calls Projects::UpdatePagesConfigurationService' do + expect(Projects::UpdatePagesConfigurationService) + .to receive(:new) + .with(project) + .and_call_original + + call_service + end + end end describe '#run_auto_devops_pipeline?' do |