add test to view
repair rubocop test and update CHANGELOG repair rubocop test repair rubocop repair rubocop repair rubocop
This commit is contained in:
parent
86df8bc353
commit
85fc83c588
2 changed files with 18 additions and 10 deletions
|
@ -129,6 +129,7 @@ v 8.9.7 (unreleased)
|
||||||
v 8.9.6
|
v 8.9.6
|
||||||
- Fix importing of events under notes for GitLab projects
|
- Fix importing of events under notes for GitLab projects
|
||||||
- Render only commit message title in builds
|
- Render only commit message title in builds
|
||||||
|
- Render only commit message title in builds (Katarzyna Kobierska Ula Budziszewska)
|
||||||
|
|
||||||
v 8.9.5
|
v 8.9.5
|
||||||
- Add more debug info to import/export and memory killer. !5108
|
- Add more debug info to import/export and memory killer. !5108
|
||||||
|
|
|
@ -3,12 +3,15 @@ require 'spec_helper'
|
||||||
describe 'projects/builds/show' do
|
describe 'projects/builds/show' do
|
||||||
include Devise::TestHelpers
|
include Devise::TestHelpers
|
||||||
|
|
||||||
let(:build) { create(:ci_build) }
|
let(:project) { create(:project) }
|
||||||
let(:project) { build.project }
|
let(:pipeline) { create(:ci_pipeline, project: project) }
|
||||||
|
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
|
||||||
|
@ -22,10 +25,6 @@ describe 'projects/builds/show' do
|
||||||
it 'does not show retry button' do
|
it 'does not show retry button' do
|
||||||
expect(rendered).not_to have_link('Retry')
|
expect(rendered).not_to have_link('Retry')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'shows commit title' do
|
|
||||||
expect(rendered).to have_text(@git_commit_title)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when build is not running' do
|
context 'when build is not running' do
|
||||||
|
@ -37,10 +36,18 @@ describe 'projects/builds/show' do
|
||||||
it 'shows retry button' do
|
it 'shows retry button' do
|
||||||
expect(rendered).to have_link('Retry')
|
expect(rendered).to have_link('Retry')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'shows commit title' do
|
|
||||||
expect(rendered).to have_text(@git_commit_title)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'show commit title' do
|
||||||
|
before do
|
||||||
|
build.run!
|
||||||
|
render
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'show commit title' do
|
||||||
|
within('p.build-light-text.append-bottom-0') do
|
||||||
|
assert page.has_content?(commit.title)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue