diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2017-10-18 21:52:53 +0300 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2017-10-18 21:52:53 +0300 |
commit | 7e72a6751fc954756f514396453042927766a785 (patch) | |
tree | b0bf571e885791fb3bbd85bca8f06593a2e56b2b /spec/models/gcp/cluster_spec.rb | |
parent | 03106288f92ac5ec9c4867cc1be9b070f157ccac (diff) | |
parent | 83b59da6549d3137f1424ee9bf16b95e4f72173e (diff) |
Merge branch '10-1-stable-prepare-rc3' into '10-1-stable'
Prepare 10.1 RC3 release
See merge request gitlab-org/gitlab-ce!14921
Diffstat (limited to 'spec/models/gcp/cluster_spec.rb')
-rw-r--r-- | spec/models/gcp/cluster_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/models/gcp/cluster_spec.rb b/spec/models/gcp/cluster_spec.rb index 350fbc257d9..8f39fff6394 100644 --- a/spec/models/gcp/cluster_spec.rb +++ b/spec/models/gcp/cluster_spec.rb @@ -7,6 +7,30 @@ describe Gcp::Cluster do it { is_expected.to validate_presence_of(:gcp_cluster_zone) } + describe '.enabled' do + subject { described_class.enabled } + + let!(:cluster) { create(:gcp_cluster, enabled: true) } + + before do + create(:gcp_cluster, enabled: false) + end + + it { is_expected.to contain_exactly(cluster) } + end + + describe '.disabled' do + subject { described_class.disabled } + + let!(:cluster) { create(:gcp_cluster, enabled: false) } + + before do + create(:gcp_cluster, enabled: true) + end + + it { is_expected.to contain_exactly(cluster) } + end + describe '#default_value_for' do let(:cluster) { described_class.new } |