Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-07 19:49:27 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-11-07 19:49:27 +0300
commit1625adf5bab8faa4291fdce1e75174d7d1faa99d (patch)
treebbb79e57e998fe89a032a7915d7c2c33c3d960ac /spec/models/clusters
parentc42786021caed7e10ca3b001be1ae08fc092417a (diff)
Make ingress to use install_command
Diffstat (limited to 'spec/models/clusters')
-rw-r--r--spec/models/clusters/applications/ingress_spec.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/models/clusters/applications/ingress_spec.rb b/spec/models/clusters/applications/ingress_spec.rb
index 495a5014190..b83472e1944 100644
--- a/spec/models/clusters/applications/ingress_spec.rb
+++ b/spec/models/clusters/applications/ingress_spec.rb
@@ -23,9 +23,19 @@ describe Clusters::Applications::Ingress do
expect(subject.status_name).to be(:not_installable)
end
- context 'when application helm is defined' do
+ context 'when application helm is scheduled' do
before do
- create(:cluster_applications_ingress, cluster: cluster)
+ create(:cluster_applications_helm, :scheduled, cluster: cluster)
+ end
+
+ it 'defaults to :not_installable' do
+ expect(subject.status_name).to be(:not_installable)
+ end
+ end
+
+ context 'when application helm is installed' do
+ before do
+ create(:cluster_applications_helm, :installed, cluster: cluster)
end
it 'defaults to :installable' do
@@ -34,6 +44,12 @@ describe Clusters::Applications::Ingress do
end
end
+ describe '#install_command' do
+ it 'has all the needed information' do
+ expect(subject.install_command).to have_attributes(name: subject.name, install_helm: false, chart: subject.chart)
+ end
+ end
+
describe 'status state machine' do
describe '#make_installing' do
subject { create(:cluster_applications_ingress, :scheduled) }