diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /spec/models/clusters/cluster_spec.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'spec/models/clusters/cluster_spec.rb')
-rw-r--r-- | spec/models/clusters/cluster_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb index dd9b96f39ad..ed74a841044 100644 --- a/spec/models/clusters/cluster_spec.rb +++ b/spec/models/clusters/cluster_spec.rb @@ -540,6 +540,27 @@ RSpec.describe Clusters::Cluster, :use_clean_rails_memory_store_caching do end end end + + describe 'helm_major_version can only be 2 or 3' do + using RSpec::Parameterized::TableSyntax + + where(:helm_major_version, :expect_valid) do + 2 | true + 3 | true + 4 | false + -1 | false + end + + with_them do + let(:cluster) { build(:cluster, helm_major_version: helm_major_version) } + + it { is_expected.to eq(expect_valid) } + end + end + end + + it 'has default helm_major_version 3' do + expect(create(:cluster).helm_major_version).to eq(3) end describe '.ancestor_clusters_for_clusterable' do |