diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /spec/helpers/clusters_helper_spec.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) | |
download | gitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'spec/helpers/clusters_helper_spec.rb')
-rw-r--r-- | spec/helpers/clusters_helper_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/helpers/clusters_helper_spec.rb b/spec/helpers/clusters_helper_spec.rb index eec62bbb990..d40ed2248ce 100644 --- a/spec/helpers/clusters_helper_spec.rb +++ b/spec/helpers/clusters_helper_spec.rb @@ -59,6 +59,32 @@ describe ClustersHelper do end end + describe '#provider_icon' do + it 'will return GCP logo with gcp argument' do + logo = helper.provider_icon('gcp') + + expect(logo).to match(%r(img alt="Google GKE" data-src="|/illustrations/logos/google_gke|svg)) + end + + it 'will return AWS logo with aws argument' do + logo = helper.provider_icon('aws') + + expect(logo).to match(%r(img alt="Amazon EKS" data-src="|/illustrations/logos/amazon_eks|svg)) + end + + it 'will return default logo with unknown provider' do + logo = helper.provider_icon('unknown') + + expect(logo).to match(%r(img alt="Kubernetes Cluster" data-src="|/illustrations/logos/kubernetes|svg)) + end + + it 'will return default logo when provider is empty' do + logo = helper.provider_icon + + expect(logo).to match(%r(img alt="Kubernetes Cluster" data-src="|/illustrations/logos/kubernetes|svg)) + end + end + describe '#cluster_type_label' do subject { helper.cluster_type_label(cluster_type) } |