diff options
author | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-08-03 10:22:01 +0200 |
---|---|---|
committer | Z.J. van de Weg <zegerjan@gitlab.com> | 2016-08-11 21:29:57 +0200 |
commit | 826862d48ef80ddd849b9e3cb05ef37ba7be41e9 (patch) | |
tree | 1fad551b93b60f50778b50ee785bd7082d93f232 /spec/views | |
parent | 49f72e705fa225175834b5e6b2b1f78f1f608b9c (diff) | |
download | gitlab-ce-826862d48ef80ddd849b9e3cb05ef37ba7be41e9.tar.gz |
Tests for release status heading on MR#show
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/merge_requests/_heading.html.haml_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/views/projects/merge_requests/_heading.html.haml_spec.rb b/spec/views/projects/merge_requests/_heading.html.haml_spec.rb new file mode 100644 index 00000000000..b78c9c7e9ef --- /dev/null +++ b/spec/views/projects/merge_requests/_heading.html.haml_spec.rb @@ -0,0 +1,23 @@ +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 |