diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-14 00:09:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-14 00:09:46 +0000 |
commit | b941629bbf312ed71c6065e2c3a6ef5a35dfa19c (patch) | |
tree | ccf5c8ecee54f5f651ec6a8346bf2e74592bac60 /spec/helpers/clusters_helper_spec.rb | |
parent | 0698388e65ed3556a11ec7eb2e76e7b7f9f0489e (diff) | |
download | gitlab-ce-b941629bbf312ed71c6065e2c3a6ef5a35dfa19c.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/clusters_helper_spec.rb')
-rw-r--r-- | spec/helpers/clusters_helper_spec.rb | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/spec/helpers/clusters_helper_spec.rb b/spec/helpers/clusters_helper_spec.rb index cebf6235f44..8ad955b61f1 100644 --- a/spec/helpers/clusters_helper_spec.rb +++ b/spec/helpers/clusters_helper_spec.rb @@ -60,18 +60,24 @@ RSpec.describe ClustersHelper do end describe '#js_clusters_list_data' do - it 'displays endpoint path and images' do - js_data = helper.js_clusters_list_data('/path') + subject { helper.js_clusters_list_data('/path') } - expect(js_data[:endpoint]).to eq('/path') + it 'displays endpoint path' do + expect(subject[:endpoint]).to eq('/path') + end + + it 'generates svg image data', :aggregate_failures do + expect(subject.dig(:img_tags, :aws, :path)).to match(%r(/illustrations/logos/amazon_eks|svg)) + expect(subject.dig(:img_tags, :default, :path)).to match(%r(/illustrations/logos/kubernetes|svg)) + expect(subject.dig(:img_tags, :gcp, :path)).to match(%r(/illustrations/logos/google_gke|svg)) - 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(subject.dig(:img_tags, :aws, :text)).to eq('Amazon EKS') + expect(subject.dig(:img_tags, :default, :text)).to eq('Kubernetes Cluster') + expect(subject.dig(:img_tags, :gcp, :text)).to eq('Google GKE') + end - 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') + it 'displays and ancestor_help_path' do + expect(subject[:ancestor_help_path]).to eq('/help/user/group/clusters/index#cluster-precedence') end end |