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/lib/gitlab/template/gitlab_ci_yml_template_spec.rb')
-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'))