diff options
Diffstat (limited to 'spec/models/clusters/platforms')
-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 |