summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/template
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 07:33:21 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-05-19 07:33:21 +0000
commit36a59d088eca61b834191dacea009677a96c052f (patch)
treee4f33972dab5d8ef79e3944a9f403035fceea43f /spec/lib/gitlab/template
parenta1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff)
downloadgitlab-ce-36a59d088eca61b834191dacea009677a96c052f.tar.gz
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/lib/gitlab/template')
-rw-r--r--spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb49
1 files changed, 0 insertions, 49 deletions
diff --git a/spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb b/spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb
index 226fdb9c948..26c83ed6793 100644
--- a/spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb
+++ b/spec/lib/gitlab/template/gitlab_ci_yml_template_spec.rb
@@ -21,55 +21,6 @@ RSpec.describe Gitlab::Template::GitlabCiYmlTemplate do
end
end
- describe '.find' do
- let_it_be(:project) { create(:project) }
- let_it_be(:other_project) { create(:project) }
-
- described_class::TEMPLATES_WITH_LATEST_VERSION.keys.each do |key|
- it "finds the latest template for #{key}" do
- result = described_class.find(key, project)
- expect(result.full_name).to eq("#{key}.latest.gitlab-ci.yml")
- expect(result.content).to be_present
- end
-
- context 'when `redirect_to_latest_template` feature flag is disabled' do
- before do
- stub_feature_flags("redirect_to_latest_template_#{key.underscore.tr('/', '_')}".to_sym => false)
- end
-
- it "finds the stable template for #{key}" do
- result = described_class.find(key, project)
- expect(result.full_name).to eq("#{key}.gitlab-ci.yml")
- expect(result.content).to be_present
- end
- end
-
- context 'when `redirect_to_latest_template` feature flag is enabled on the project' do
- before do
- stub_feature_flags("redirect_to_latest_template_#{key.underscore.tr('/', '_')}".to_sym => project)
- end
-
- it "finds the latest template for #{key}" do
- result = described_class.find(key, project)
- expect(result.full_name).to eq("#{key}.latest.gitlab-ci.yml")
- expect(result.content).to be_present
- end
- end
-
- context 'when `redirect_to_latest_template` feature flag is enabled on the other project' do
- before do
- stub_feature_flags("redirect_to_latest_template_#{key.underscore.tr('/', '_')}".to_sym => other_project)
- end
-
- it "finds the stable template for #{key}" do
- result = described_class.find(key, project)
- expect(result.full_name).to eq("#{key}.gitlab-ci.yml")
- expect(result.content).to be_present
- end
- end
- end
- end
-
describe '#content' do
it 'loads the full file' do
gitignore = subject.new(Rails.root.join('lib/gitlab/ci/templates/Ruby.gitlab-ci.yml'))