summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubudzisz <ubudzisz@gmail.com>2016-07-15 11:10:30 +0200
committerubudzisz <ubudzisz@gmail.com>2016-07-18 12:39:24 +0200
commit9d75ecedac4e9754ac7d9c4ccc7290df576df6b8 (patch)
tree5509d9544ee8707d9900978a6c950b853849214c
parent9244a36edbc50b69556109348616beeccb5f68ea (diff)
downloadgitlab-ce-9d75ecedac4e9754ac7d9c4ccc7290df576df6b8.tar.gz
modify view test to commit title
modify view test to commit title-repair rubocop modify view test to commit title-repair rubocop modify view test to commit title-repair rubocop
-rw-r--r--spec/views/projects/builds/show.html.haml_spec.rb15
1 files changed, 5 insertions, 10 deletions
diff --git a/spec/views/projects/builds/show.html.haml_spec.rb b/spec/views/projects/builds/show.html.haml_spec.rb
index c71705fe8e5..61004d0fed7 100644
--- a/spec/views/projects/builds/show.html.haml_spec.rb
+++ b/spec/views/projects/builds/show.html.haml_spec.rb
@@ -6,12 +6,10 @@ describe 'projects/builds/show' do
let(:project) { create(:project) }
let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) }
- let(:commit) { project.commit }
before do
assign(:build, build)
assign(:project, project)
- assign(:commit_title, build.project.commit.title)
allow(view).to receive(:can?).and_return(true)
end
@@ -38,15 +36,12 @@ describe 'projects/builds/show' do
end
end
- context 'show commit title' do
- before do
- build.run!
- render
- end
-
- it 'show commit title' do
+ 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
- assert page.has_content?(commit.title)
+ expect(rendered).to have_content(commit_title)
end
end
end