diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-12-13 20:53:15 +1300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-12-13 20:53:15 +1300 |
commit | 459758921faefa10c475c4691faa4d388eb00df8 (patch) | |
tree | 2ed204c55d211c340f5b0baa6078043897b19795 /spec/presenters | |
parent | e7a6b841684f9a2929b16176b223ea44bfc26332 (diff) | |
download | gitlab-ce-459758921faefa10c475c4691faa4d388eb00df8.tar.gz |
Move description of cluster type to presenter
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/clusters/cluster_presenter_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/presenters/clusters/cluster_presenter_spec.rb b/spec/presenters/clusters/cluster_presenter_spec.rb index 72c5eac3ede..63c2ff26a45 100644 --- a/spec/presenters/clusters/cluster_presenter_spec.rb +++ b/spec/presenters/clusters/cluster_presenter_spec.rb @@ -74,6 +74,20 @@ describe Clusters::ClusterPresenter do end end + describe '#cluster_type_description' do + subject { described_class.new(cluster).cluster_type_description } + + context 'project_type cluster' do + it { is_expected.to eq('Project cluster') } + end + + context 'group_type cluster' do + let(:cluster) { create(:cluster, :provided_by_gcp, :group) } + + it { is_expected.to eq('Group cluster') } + end + end + describe '#show_path' do subject { described_class.new(cluster).show_path } |