diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-03-29 18:23:18 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-03-29 18:23:18 +0000 |
commit | ab06d1eda2fa222b4de400d2b18eab611ffefa68 (patch) | |
tree | 978ed57b01da01e1187db25f0423e2ada85550b7 /spec/presenters | |
parent | 0df75d241a5054a19086dca29cca4d65ac1736fe (diff) | |
download | gitlab-ce-ab06d1eda2fa222b4de400d2b18eab611ffefa68.tar.gz |
Renames Cluster#managed? to provided_by_user?
This will allow to user the term managed? on
https://gitlab.com/gitlab-org/gitlab-ce/issues/56557. Managed? will be
used to distinct clusters that are automatically managed by GitLab
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/clusters/cluster_presenter_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/presenters/clusters/cluster_presenter_spec.rb b/spec/presenters/clusters/cluster_presenter_spec.rb index 754ba0a594c..a9d786bc872 100644 --- a/spec/presenters/clusters/cluster_presenter_spec.rb +++ b/spec/presenters/clusters/cluster_presenter_spec.rb @@ -228,4 +228,20 @@ describe Clusters::ClusterPresenter do it { is_expected.to eq(group_cluster_path(group, cluster)) } end end + + describe '#read_only_kubernetes_platform_fields?' do + subject { described_class.new(cluster).read_only_kubernetes_platform_fields? } + + context 'with a user-provided cluster' do + let(:cluster) { build_stubbed(:cluster, :provided_by_user) } + + it { is_expected.to be_falsy } + end + + context 'with a GCP-provided cluster' do + let(:cluster) { build_stubbed(:cluster, :provided_by_gcp) } + + it { is_expected.to be_truthy } + end + end end |