diff options
Diffstat (limited to 'spec/features/projects/pipelines/pipeline_spec.rb')
-rw-r--r-- | spec/features/projects/pipelines/pipeline_spec.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb index b8fa1a54c24..888e290292b 100644 --- a/spec/features/projects/pipelines/pipeline_spec.rb +++ b/spec/features/projects/pipelines/pipeline_spec.rb @@ -185,6 +185,36 @@ describe 'Pipeline', :js do end end + context 'when user does not have access to read jobs' do + before do + project.update(public_builds: false) + end + + describe 'GET /:project/pipelines/:id' do + include_context 'pipeline builds' + + let(:project) { create(:project, :repository) } + let(:pipeline) { create(:ci_pipeline, project: project, ref: 'master', sha: project.commit.id, user: user) } + + before do + visit project_pipeline_path(project, pipeline) + end + + it 'shows the pipeline graph' do + expect(page).to have_selector('.pipeline-visualization') + expect(page).to have_content('Build') + expect(page).to have_content('Test') + expect(page).to have_content('Deploy') + expect(page).to have_content('Retry') + expect(page).to have_content('Cancel running') + end + + it 'should not link to job' do + expect(page).not_to have_selector('.js-pipeline-graph-job-link') + end + end + end + describe 'GET /:project/pipelines/:id/builds' do include_context 'pipeline builds' |