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:
authorNick Thomas <nick@gitlab.com>2018-03-23 18:48:28 +0300
committerNick Thomas <nick@gitlab.com>2018-03-23 18:48:28 +0300
commit457a99c612acf59ec9cc4d0793c53465f914e696 (patch)
treeca474ece3e4db339d225d9789298ee78051848eb /spec/services/projects
parent79dd74db14ffdac34fa2eff0aa26387b29a16cb5 (diff)
parent9d45951fcaeda4f01a2e4be2480d980a3e7cd37e (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.rb21
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