diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-07 14:52:11 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-07 14:52:11 +0100 |
commit | 760a154a032319a90e15dcf4d54ec1c1cdde9e1c (patch) | |
tree | 15de9ed0cdb9f4aa09f6c25a642971d186da2119 /spec/models/clusters/applications/helm_spec.rb | |
parent | 55d098c94b4f7e39931d5e4084be19872386fa18 (diff) | |
download | gitlab-ce-760a154a032319a90e15dcf4d54ec1c1cdde9e1c.tar.gz |
Fix tests for initial status
Diffstat (limited to 'spec/models/clusters/applications/helm_spec.rb')
-rw-r--r-- | spec/models/clusters/applications/helm_spec.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/spec/models/clusters/applications/helm_spec.rb b/spec/models/clusters/applications/helm_spec.rb index 2b1922fdd5b..beb10bf38c9 100644 --- a/spec/models/clusters/applications/helm_spec.rb +++ b/spec/models/clusters/applications/helm_spec.rb @@ -21,8 +21,20 @@ describe Clusters::Applications::Helm do end describe '#status' do - it 'defaults to :installable' do - expect(subject.status_name).to be(:installable) + let(:cluster) { create(:cluster) } + + subject { described_class.new(cluster: cluster) } + + it 'defaults to :not_installable' do + expect(subject.status_name).to be(:not_installable) + end + + context 'when platform kubernetes is defined' do + let(:cluster) { create(:cluster, :provided_by_gcp) } + + it 'defaults to :installable' do + expect(subject.status_name).to be(:installable) + end end end |