diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 15:08:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 15:08:59 +0300 |
commit | 7351a484d79236b7e9d47c86f2fcc970b7ae10b0 (patch) | |
tree | 651b5fca7ea0460e3ce7c687cfa9e3a3b37eefc8 /spec/models/deployment_cluster_spec.rb | |
parent | b4ded0ba7b4d2cdbed5b1f331cf2083a25ee4d7c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/deployment_cluster_spec.rb')
-rw-r--r-- | spec/models/deployment_cluster_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/models/deployment_cluster_spec.rb b/spec/models/deployment_cluster_spec.rb new file mode 100644 index 00000000000..8bb09e9a510 --- /dev/null +++ b/spec/models/deployment_cluster_spec.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe DeploymentCluster do + let(:cluster) { create(:cluster) } + let(:deployment) { create(:deployment) } + let(:kubernetes_namespace) { 'an-example-namespace' } + + subject { described_class.new(deployment: deployment, cluster: cluster, kubernetes_namespace: kubernetes_namespace) } + + it { is_expected.to belong_to(:deployment).required } + it { is_expected.to belong_to(:cluster).required } + + it do + is_expected.to have_attributes( + cluster_id: cluster.id, + deployment_id: deployment.id, + kubernetes_namespace: kubernetes_namespace + ) + end +end |