diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/models/clusters/platforms/kubernetes_spec.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/models/clusters/platforms/kubernetes_spec.rb')
-rw-r--r-- | spec/models/clusters/platforms/kubernetes_spec.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/models/clusters/platforms/kubernetes_spec.rb b/spec/models/clusters/platforms/kubernetes_spec.rb index fb0613187c5..07e64889b93 100644 --- a/spec/models/clusters/platforms/kubernetes_spec.rb +++ b/spec/models/clusters/platforms/kubernetes_spec.rb @@ -17,6 +17,8 @@ RSpec.describe Clusters::Platforms::Kubernetes do it { is_expected.to delegate_method(:enabled?).to(:cluster) } it { is_expected.to delegate_method(:provided_by_user?).to(:cluster) } + it { is_expected.to nullify_if_blank(:namespace) } + it_behaves_like 'having unique enum values' describe 'before_validation' do @@ -29,14 +31,6 @@ RSpec.describe Clusters::Platforms::Kubernetes do expect(kubernetes.namespace).to eq('abc') end end - - context 'when namespace is blank' do - let(:namespace) { '' } - - it 'nullifies the namespace' do - expect(kubernetes.namespace).to be_nil - end - end end describe 'validation' do |