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:
authorMatt Kasa <mkasa@gitlab.com>2019-09-12 09:37:13 +0300
committerMatt Kasa <mkasa@gitlab.com>2019-09-12 09:37:13 +0300
commit7c2a6b7c841e956f3ac586ae800f423901c408c0 (patch)
tree87d9a404760b9d139874b9249bfa29a25e826e65
parentcf9d9f970404701ff10fb9565d5fafecda6ccc92 (diff)
Add spec for application#status_states
-rw-r--r--spec/support/shared_examples/models/cluster_application_status_shared_examples.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb b/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
index 5341aacb445..6f06d323a82 100644
--- a/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
+++ b/spec/support/shared_examples/models/cluster_application_status_shared_examples.rb
@@ -11,6 +11,20 @@ shared_examples 'cluster application status specs' do |application_name|
end
end
+ describe '#status_states' do
+ let(:cluster) { create(:cluster, :provided_by_gcp) }
+
+ subject { described_class.new(cluster: cluster) }
+
+ it 'returns a hash of state values' do
+ expect(subject.status_states).to include(:installed)
+ end
+
+ it 'returns an integer for installed state value' do
+ expect(subject.status_states[:installed]).to eq(3)
+ end
+ end
+
describe '.available' do
subject { described_class.available }