summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-09-20 15:19:55 +0200
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-09-30 12:22:55 +0200
commit7dfb204ef9d343888e2fd8327c5a5348b98a76ce (patch)
tree35d1760ca664f9e9a029516eaef7b459a4b7aa84 /spec/views
parente26953bc4bc7c9522258f201b175c60fd6c0b2a2 (diff)
downloadgitlab-ce-7dfb204ef9d343888e2fd8327c5a5348b98a76ce.tar.gz
Expose jobs to view
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/ci/lints/show.html.haml_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/views/ci/lints/show.html.haml_spec.rb b/spec/views/ci/lints/show.html.haml_spec.rb
index be41134d12a..620fb0e4821 100644
--- a/spec/views/ci/lints/show.html.haml_spec.rb
+++ b/spec/views/ci/lints/show.html.haml_spec.rb
@@ -20,6 +20,7 @@ describe 'ci/lints/show' do
assign(:status, true)
assign(:builds, config_processor.builds)
assign(:stages, config_processor.stages)
+ assign(:jobs, config_processor.jobs)
end
it 'shows the correct values' do
@@ -32,4 +33,19 @@ describe 'ci/lints/show' do
expect(rendered).to have_content('When: on_success')
end
end
+
+ context 'when the content is invalid' do
+ before do
+ assign(:status, false)
+ assign(:error, 'Undefined error')
+ end
+
+ it 'shows error message' do
+ render
+
+ expect(rendered).to have_content('Status: syntax is incorrec')
+ expect(rendered).to have_content('Error: Undefined error')
+ expect(rendered).not_to have_content('Tag list:')
+ end
+ end
end