diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-19 03:08:49 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-19 03:08:49 +0300 |
commit | af5bf83315cddeb562d2429ae88b09a95b647472 (patch) | |
tree | 350b6526fe6abfcce2ecae22760caeee19b6921b /spec/lib | |
parent | af7558b036a53ebb0484e7978694a0b419c38c70 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/gon_helper_spec.rb | 13 | ||||
-rw-r--r-- | spec/lib/gitlab/pages/url_builder_spec.rb | 12 |
2 files changed, 12 insertions, 13 deletions
diff --git a/spec/lib/gitlab/gon_helper_spec.rb b/spec/lib/gitlab/gon_helper_spec.rb index d9dcae3cdc7..de81e54a206 100644 --- a/spec/lib/gitlab/gon_helper_spec.rb +++ b/spec/lib/gitlab/gon_helper_spec.rb @@ -202,19 +202,6 @@ RSpec.describe Gitlab::GonHelper do helper.add_browsersdk_tracking end end - - context 'when feature flag is false' do - before do - stub_feature_flags(gl_analytics_tracking: false) - end - - it "doesn't set the analytics_url and analytics_id" do - expect(gon).not_to receive(:analytics_url=) - expect(gon).not_to receive(:analytics_id=) - - helper.add_browsersdk_tracking - end - end end context 'when environment variables are not set' do diff --git a/spec/lib/gitlab/pages/url_builder_spec.rb b/spec/lib/gitlab/pages/url_builder_spec.rb index 1a97ca01c3e..863c4481c9e 100644 --- a/spec/lib/gitlab/pages/url_builder_spec.rb +++ b/spec/lib/gitlab/pages/url_builder_spec.rb @@ -63,6 +63,12 @@ RSpec.describe Gitlab::Pages::UrlBuilder, feature_category: :pages do it { is_expected.to eq('http://group.example.com/project') } end + context 'when project is upper cased' do + let(:full_path) { 'group/Project' } + + it { is_expected.to eq('http://group.example.com/project') } + end + context 'when project is in a nested group page' do let(:full_path) { 'group/subgroup/project' } @@ -127,6 +133,12 @@ RSpec.describe Gitlab::Pages::UrlBuilder, feature_category: :pages do it { is_expected.to eq('http://example.com/group/project') } end + context 'when project is upper cased' do + let(:full_path) { 'group/Project' } + + it { is_expected.to eq('http://example.com/group/project') } + end + context 'when project is in a nested group page' do let(:full_path) { 'group/subgroup/project' } |