summaryrefslogtreecommitdiff
path: root/spec/views/projects
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-20 16:06:01 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-20 16:06:01 +0100
commitec4b1bc7556848c6683546559290a6576301c05d (patch)
treeb86c4a467bf189f77bf11af386b2713e95eaaaa3 /spec/views/projects
parent9c6480db8993ee6f1d8d1fac29e044dd00d66465 (diff)
downloadgitlab-ce-ec4b1bc7556848c6683546559290a6576301c05d.tar.gz
Add isolated view spec for pipeline stage partial
Diffstat (limited to 'spec/views/projects')
-rw-r--r--spec/views/projects/pipelines/_stage.html.haml_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/views/projects/pipelines/_stage.html.haml_spec.rb b/spec/views/projects/pipelines/_stage.html.haml_spec.rb
new file mode 100644
index 00000000000..eb7f7ca4a1a
--- /dev/null
+++ b/spec/views/projects/pipelines/_stage.html.haml_spec.rb
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+describe 'projects/pipelines/_stage', :view do
+ let(:project) { create(:project) }
+ let(:pipeline) { create(:ci_pipeline, project: project) }
+ let(:stage) { build(:ci_stage, pipeline: pipeline) }
+
+ before do
+ assign :stage, stage
+
+ create(:ci_build, name: 'test:build',
+ stage: stage.name,
+ pipeline: pipeline)
+ end
+
+ it 'shows the builds in the stage' do
+ render
+
+ expect(rendered).to have_text 'test:build'
+ end
+end