Commit 9d75eced authored by ubudzisz's avatar ubudzisz

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
parent 9244a36e
...@@ -6,12 +6,10 @@ describe 'projects/builds/show' do ...@@ -6,12 +6,10 @@ describe 'projects/builds/show' do
let(:project) { create(:project) } let(:project) { create(:project) }
let(:pipeline) { create(:ci_pipeline, project: project) } let(:pipeline) { create(:ci_pipeline, project: project) }
let(:build) { create(:ci_build, pipeline: pipeline) } let(:build) { create(:ci_build, pipeline: pipeline) }
let(:commit) { project.commit }
before do before do
assign(:build, build) assign(:build, build)
assign(:project, project) assign(:project, project)
assign(:commit_title, build.project.commit.title)
allow(view).to receive(:can?).and_return(true) allow(view).to receive(:can?).and_return(true)
end end
...@@ -38,15 +36,12 @@ describe 'projects/builds/show' do ...@@ -38,15 +36,12 @@ describe 'projects/builds/show' do
end end
end end
context 'show commit title' do describe 'projects/builds/show/commit title' do
before do let(:commit_title) {build.project.commit.title}
build.run!
render it 'shows commit title' do
end
it 'show commit title' do
within('p.build-light-text.append-bottom-0') 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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment