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/models/pages/lookup_path_spec.rb')
-rw-r--r--spec/models/pages/lookup_path_spec.rb15
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/models/pages/lookup_path_spec.rb b/spec/models/pages/lookup_path_spec.rb
index 88fd1bd9e56..62152f9d3a4 100644
--- a/spec/models/pages/lookup_path_spec.rb
+++ b/spec/models/pages/lookup_path_spec.rb
@@ -8,7 +8,12 @@ RSpec.describe Pages::LookupPath, feature_category: :pages do
subject(:lookup_path) { described_class.new(project) }
before do
- stub_pages_setting(access_control: true, external_https: ["1.1.1.1:443"])
+ stub_pages_setting(
+ access_control: true,
+ external_https: ["1.1.1.1:443"],
+ url: 'http://example.com',
+ protocol: 'http'
+ )
stub_pages_object_storage(::Pages::DeploymentUploader)
end
@@ -120,18 +125,14 @@ RSpec.describe Pages::LookupPath, feature_category: :pages do
describe '#prefix' do
it 'returns "/" for pages group root projects' do
- project = instance_double(Project, pages_namespace_url: "namespace.test", pages_url: "namespace.test")
+ project = instance_double(Project, full_path: "namespace/namespace.example.com")
lookup_path = described_class.new(project, trim_prefix: 'mygroup')
expect(lookup_path.prefix).to eq('/')
end
it 'returns the project full path with the provided prefix removed' do
- project = instance_double(
- Project,
- pages_namespace_url: "namespace.test",
- pages_url: "namespace.other",
- full_path: 'mygroup/myproject')
+ project = instance_double(Project, full_path: 'mygroup/myproject')
lookup_path = described_class.new(project, trim_prefix: 'mygroup')
expect(lookup_path.prefix).to eq('/myproject/')