diff options
author | ubudzisz <ubudzisz@gmail.com> | 2016-07-18 10:40:33 +0200 |
---|---|---|
committer | ubudzisz <ubudzisz@gmail.com> | 2016-07-18 15:03:27 +0200 |
commit | 4ff3ef6f925633f66a120c4844d93542bb1d6e2a (patch) | |
tree | 9ffede1246ad6e4853fbfce67c08e032c87a32b6 /spec | |
parent | af44c0ba860084c121523d1403932fc4caefcb0a (diff) | |
download | gitlab-ce-4ff3ef6f925633f66a120c4844d93542bb1d6e2a.tar.gz |
add modification to commit title test
add modification to commit title test
add empty line
Diffstat (limited to 'spec')
-rw-r--r-- | spec/views/projects/builds/show.html.haml_spec.rb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb index 61004d0fed7..42220a20c75 100644 --- a/spec/views/projects/builds/show.html.haml_spec.rb +++ b/spec/views/projects/builds/show.html.haml_spec.rb @@ -4,7 +4,10 @@ describe 'projects/builds/show' do include Devise::TestHelpers let(:project) { create(:project) } - let(:pipeline) { create(:ci_pipeline, project: project) } + let(:pipeline) do + create(:ci_pipeline, project: project, + sha: project.commit.id) + end let(:build) { create(:ci_build, pipeline: pipeline) } before do @@ -36,13 +39,14 @@ describe 'projects/builds/show' do end end - describe 'projects/builds/show/commit title' do - let(:commit_title) {build.project.commit.title} - - it 'shows commit title' do - within('p.build-light-text.append-bottom-0') do - expect(rendered).to have_content(commit_title) - end - end + describe 'commit title in sidebar' do + let(:commit_title) { project.commit.title } + + it 'shows commit title and not show commit message' do + render + + expect(rendered).to have_css('p.build-light-text.append-bottom-0', + text: /\A\n#{Regexp.escape(commit_title)}\n\Z/) + end end end |