summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 12:08:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-31 12:08:09 +0000
commit0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a (patch)
tree64f91b4d4ca74aa09d2a62ac5910820d087ed7cb /spec/helpers
parent6044caed20964a70c1ac6c5a3365d567ed96dfde (diff)
downloadgitlab-ce-0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/environments_helper_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/helpers/environments_helper_spec.rb b/spec/helpers/environments_helper_spec.rb
index 37713a04844..aaa90a7d2af 100644
--- a/spec/helpers/environments_helper_spec.rb
+++ b/spec/helpers/environments_helper_spec.rb
@@ -33,7 +33,8 @@ describe EnvironmentsHelper do
'tags-path' => project_tags_path(project),
'has-metrics' => "#{environment.has_metrics?}",
'prometheus-status' => "#{environment.prometheus_status}",
- 'external-dashboard-url' => nil
+ 'external-dashboard-url' => nil,
+ 'environment-state' => environment.state
)
end
@@ -46,5 +47,15 @@ describe EnvironmentsHelper do
expect(metrics_data['external-dashboard-url']).to eq('http://gitlab.com')
end
end
+
+ context 'when the environment is not available' do
+ before do
+ environment.stop
+ end
+
+ subject { metrics_data }
+
+ it { is_expected.to include('environment-state' => 'stopped') }
+ end
end
end