diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-07 18:36:29 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-02-07 18:36:29 +0300 |
commit | 1c73b764b87f418e32ebd1617c3f342c01518670 (patch) | |
tree | 3f1d9bb0458c5770fbf47d7794503347e89fb482 /spec | |
parent | 25c1f0510347cc3891a9b1a2b113b2c51eacc2aa (diff) |
Add feature spec for a new merge request with pipeline
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/merge_requests/create_new_mr_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/features/merge_requests/create_new_mr_spec.rb b/spec/features/merge_requests/create_new_mr_spec.rb index f1b68a39343..e853fb7e016 100644 --- a/spec/features/merge_requests/create_new_mr_spec.rb +++ b/spec/features/merge_requests/create_new_mr_spec.rb @@ -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 |