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
This commit is contained in:
parent
9244a36edb
commit
9d75ecedac
1 changed files with 5 additions and 10 deletions
|
@ -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
|
||||
describe 'projects/builds/show/commit title' do
|
||||
let(:commit_title) {build.project.commit.title}
|
||||
|
||||
it 'show commit title' do
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue