summaryrefslogtreecommitdiff
path: root/spec/models/clusters/cluster_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-13 06:06:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-13 06:06:38 +0000
commit213ce7805856f2cc1d019a03c76ae0d098337c26 (patch)
treee97e9e02515dd83a2a5decd66ae8553ebb93b350 /spec/models/clusters/cluster_spec.rb
parentd41c040fa25a8b4092843b84bf7d839591b6ee09 (diff)
downloadgitlab-ce-213ce7805856f2cc1d019a03c76ae0d098337c26.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/clusters/cluster_spec.rb')
-rw-r--r--spec/models/clusters/cluster_spec.rb23
1 files changed, 1 insertions, 22 deletions
diff --git a/spec/models/clusters/cluster_spec.rb b/spec/models/clusters/cluster_spec.rb
index 198a3dfd37a..253866c8425 100644
--- a/spec/models/clusters/cluster_spec.rb
+++ b/spec/models/clusters/cluster_spec.rb
@@ -29,6 +29,7 @@ describe Clusters::Cluster, :use_clean_rails_memory_store_caching do
it { is_expected.to delegate_method(:status).to(:provider) }
it { is_expected.to delegate_method(:status_reason).to(:provider) }
it { is_expected.to delegate_method(:on_creation?).to(:provider) }
+ it { is_expected.to delegate_method(:knative_pre_installed?).to(:provider) }
it { is_expected.to delegate_method(:active?).to(:platform_kubernetes).with_prefix }
it { is_expected.to delegate_method(:rbac?).to(:platform_kubernetes).with_prefix }
it { is_expected.to delegate_method(:available?).to(:application_helm).with_prefix }
@@ -916,26 +917,4 @@ describe Clusters::Cluster, :use_clean_rails_memory_store_caching do
end
end
end
-
- describe '#knative_pre_installed?' do
- subject { cluster.knative_pre_installed? }
-
- context 'with a GCP provider without cloud_run' do
- let(:cluster) { create(:cluster, :provided_by_gcp) }
-
- it { is_expected.to be_falsey }
- end
-
- context 'with a GCP provider with cloud_run' do
- let(:cluster) { create(:cluster, :provided_by_gcp, :cloud_run_enabled) }
-
- it { is_expected.to be_truthy }
- end
-
- context 'with a user provider' do
- let(:cluster) { create(:cluster, :provided_by_user) }
-
- it { is_expected.to be_falsey }
- end
- end
end