summaryrefslogtreecommitdiff
path: root/spec/views
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-01-25 11:30:08 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-01-27 14:27:07 +0000
commit4472779b7f93e07558f5afa1b1f6b23564de3ccd (patch)
tree1263530bb056e539db186511516d7b36e5d047c0 /spec/views
parenta0872833351bba7fb9f2f78101a6ba87f83c21b2 (diff)
downloadgitlab-ce-4472779b7f93e07558f5afa1b1f6b23564de3ccd.tar.gz
Adds tests to build view
Fix CHANGELOG entry
Diffstat (limited to 'spec/views')
-rw-r--r--spec/views/projects/builds/show.html.haml_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb
index 745d0c745bd..585906b9d31 100644
--- a/spec/views/projects/builds/show.html.haml_spec.rb
+++ b/spec/views/projects/builds/show.html.haml_spec.rb
@@ -15,6 +15,32 @@ describe 'projects/builds/show', :view do
allow(view).to receive(:can?).and_return(true)
end
+ describe 'build information in header' do
+ let(:build) do
+ create(:ci_build, :success, environment: 'staging')
+ end
+
+ before do
+ render
+ end
+
+ it 'shows status name' do
+ expect(rendered).to have_css('.ci-status.ci-success', text: 'passed')
+ end
+
+ it 'shows build id' do
+ expect(rendered).to have_css('.js-build-id', text: build.id)
+ end
+
+ it 'shows a link to the pipeline' do
+ expect(rendered).to have_link(build.pipeline.id)
+ end
+
+ it 'shows a link to the commit' do
+ expect(rendered).to have_link(build.pipeline.short_sha)
+ end
+ end
+
describe 'environment info in build view' do
context 'build with latest deployment' do
let(:build) do