summaryrefslogtreecommitdiff
path: root/spec/helpers/projects_helper_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-20 15:19:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-20 15:19:03 +0000
commit14bd84b61276ef29b97d23642d698de769bacfd2 (patch)
treef9eba90140c1bd874211dea17750a0d422c04080 /spec/helpers/projects_helper_spec.rb
parent891c388697b2db0d8ee0c8358a9bdbf6dc56d581 (diff)
downloadgitlab-ce-14bd84b61276ef29b97d23642d698de769bacfd2.tar.gz
Add latest changes from gitlab-org/gitlab@15-10-stable-eev15.10.0-rc42
Diffstat (limited to 'spec/helpers/projects_helper_spec.rb')
-rw-r--r--spec/helpers/projects_helper_spec.rb31
1 files changed, 29 insertions, 2 deletions
diff --git a/spec/helpers/projects_helper_spec.rb b/spec/helpers/projects_helper_spec.rb
index 477b5cd7753..93352715ff4 100644
--- a/spec/helpers/projects_helper_spec.rb
+++ b/spec/helpers/projects_helper_spec.rb
@@ -1286,7 +1286,7 @@ RSpec.describe ProjectsHelper, feature_category: :source_code_management do
let_it_be(:has_active_license) { true }
it 'displays the correct messagee' do
- expect(subject).to eq(s_('Clusters|The certificate-based Kubernetes integration has been deprecated and will be turned off at the end of February 2023. Please %{linkStart}migrate to the GitLab agent for Kubernetes%{linkEnd} or reach out to GitLab support.'))
+ expect(subject).to eq(s_('Clusters|The certificate-based Kubernetes integration has been deprecated and will be turned off at the end of February 2023. Please %{linkStart}migrate to the GitLab agent for Kubernetes%{linkEnd}. Contact GitLab Support if you have any additional questions.'))
end
end
@@ -1373,9 +1373,36 @@ RSpec.describe ProjectsHelper, feature_category: :source_code_management do
source_name: source_project.full_name,
source_path: project_path(source_project),
ahead_compare_path: ahead_path,
- behind_compare_path: behind_path
+ behind_compare_path: behind_path,
+ source_default_branch: source_project.default_branch
})
end
end
end
+
+ describe '#remote_mirror_setting_enabled?' do
+ it 'returns false' do
+ expect(helper.remote_mirror_setting_enabled?).to be_falsy
+ end
+ end
+
+ describe '#http_clone_url_to_repo' do
+ before do
+ allow(project).to receive(:http_url_to_repo).and_return('http_url_to_repo')
+ end
+
+ subject { helper.http_clone_url_to_repo(project) }
+
+ it { expect(subject).to eq('http_url_to_repo') }
+ end
+
+ describe '#ssh_clone_url_to_repo' do
+ before do
+ allow(project).to receive(:ssh_url_to_repo).and_return('ssh_url_to_repo')
+ end
+
+ subject { helper.ssh_clone_url_to_repo(project) }
+
+ it { expect(subject).to eq('ssh_url_to_repo') }
+ end
end