diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 18:08:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 18:08:01 +0000 |
commit | 8e45d25f7dde6508839ffee719c0ddc2cf6b12d3 (patch) | |
tree | 9839e7fe63b36904d40995ebf519124c9a8f7681 /spec/helpers/environment_helper_spec.rb | |
parent | 00c78fb814d7ce00989ac04edd6cdaa3239da284 (diff) | |
download | gitlab-ce-8e45d25f7dde6508839ffee719c0ddc2cf6b12d3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers/environment_helper_spec.rb')
-rw-r--r-- | spec/helpers/environment_helper_spec.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/helpers/environment_helper_spec.rb b/spec/helpers/environment_helper_spec.rb new file mode 100644 index 00000000000..53953d72b06 --- /dev/null +++ b/spec/helpers/environment_helper_spec.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe EnvironmentHelper do + describe '#render_deployment_status' do + context 'when using a manual deployment' do + it 'renders a span tag' do + deploy = build(:deployment, deployable: nil, status: :success) + html = helper.render_deployment_status(deploy) + + expect(html).to have_css('span.ci-status.ci-success') + end + end + + context 'when using a deployment from a build' do + it 'renders a link tag' do + deploy = build(:deployment, status: :success) + html = helper.render_deployment_status(deploy) + + expect(html).to have_css('a.ci-status.ci-success') + end + end + end +end |