diff options
Diffstat (limited to 'spec/models/clusters/kubernetes_namespace_spec.rb')
-rw-r--r-- | spec/models/clusters/kubernetes_namespace_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/models/clusters/kubernetes_namespace_spec.rb b/spec/models/clusters/kubernetes_namespace_spec.rb index 2920bbf2b58..3b903fe34f9 100644 --- a/spec/models/clusters/kubernetes_namespace_spec.rb +++ b/spec/models/clusters/kubernetes_namespace_spec.rb @@ -61,7 +61,8 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do end describe 'namespace uniqueness validation' do - let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace, namespace: 'my-namespace') } + let_it_be(:cluster) { create(:cluster, :project, :provided_by_gcp) } + let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace, cluster: cluster, namespace: 'my-namespace') } subject { kubernetes_namespace } |