Commit 826862d4 authored by Z.J. van de Weg's avatar Z.J. van de Weg

Tests for release status heading on MR#show

parent 49f72e70
......@@ -15,8 +15,8 @@
= link_to "View details", builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: "js-show-tab", data: {action: 'builds'}
- elsif @merge_request.has_ci?
// Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
// Remove in later versions when services like Jenkins will set CI status via Commit status API
- # Compatibility with old CI integrations (ex jenkins) when you request status from CI server via AJAX
- # Remove in later versions when services like Jenkins will set CI status via Commit status API
.mr-widget-heading
- %w[success skipped canceled failed running pending].each do |status|
.ci_widget{class: "ci-#{status}", style: "display:none"}
......
require 'spec_helper'
describe 'projects/merge_requests/widget/_heading' do
include Devise::TestHelpers
context 'when released to an environment' do
let(:project) { merge_request.target_project }
let(:merge_request) { create(:merge_request, :merged) }
let(:environment) { create(:environment, project: project) }
let!(:deployment) { create(:deployment, environment: environment,
sha: 'a5391128b0ef5d21df5dd23d98557f4ef12fae20') }
before do
assign(:merge_request, merge_request)
render
end
it 'displays that the environment is deployed' do
expect(rendered).to match('Released to')
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment