Add feature spec for a new merge request with pipeline

This commit is contained in:
Grzegorz Bizon 2017-02-07 16:36:29 +01:00
parent 25c1f05103
commit 1c73b764b8

View file

@ -84,4 +84,24 @@ feature 'Create New Merge Request', feature: true, js: true do
expect(page).not_to have_selector('#error_explanation')
expect(page).not_to have_content('The form contains the following error')
end
context 'when a new merge request has a pipeline' do
let!(:pipeline) do
create(:ci_pipeline, sha: project.commit('fix').id,
ref: 'fix',
project: project)
end
it 'shows pipelines for a new merge request' do
visit new_namespace_project_merge_request_path(
project.namespace, project,
merge_request: { target_branch: 'master', source_branch: 'fix' })
page.within('.merge-request') do
click_link 'Pipelines'
expect(page).to have_content "##{pipeline.id}"
end
end
end
end