diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/helpers/clusters_helper_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/helpers/clusters_helper_spec.rb')
-rw-r--r-- | spec/helpers/clusters_helper_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/helpers/clusters_helper_spec.rb b/spec/helpers/clusters_helper_spec.rb index d40ed2248ce..c41d4f0ede7 100644 --- a/spec/helpers/clusters_helper_spec.rb +++ b/spec/helpers/clusters_helper_spec.rb @@ -59,6 +59,22 @@ describe ClustersHelper do end end + describe '#js_clusters_list_data' do + it 'displays endpoint path and images' do + js_data = helper.js_clusters_list_data('/path') + + expect(js_data[:endpoint]).to eq('/path') + + expect(js_data.dig(:img_tags, :aws, :path)).to match(%r(/illustrations/logos/amazon_eks|svg)) + expect(js_data.dig(:img_tags, :default, :path)).to match(%r(/illustrations/logos/kubernetes|svg)) + expect(js_data.dig(:img_tags, :gcp, :path)).to match(%r(/illustrations/logos/google_gke|svg)) + + expect(js_data.dig(:img_tags, :aws, :text)).to eq('Amazon EKS') + expect(js_data.dig(:img_tags, :default, :text)).to eq('Kubernetes Cluster') + expect(js_data.dig(:img_tags, :gcp, :text)).to eq('Google GKE') + end + end + describe '#provider_icon' do it 'will return GCP logo with gcp argument' do logo = helper.provider_icon('gcp') |