diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-04-05 23:33:19 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-04-05 23:33:19 +0800 |
commit | 34eea29511b9730fdab0316573d26d864d0f1e98 (patch) | |
tree | 2a0fc57d9bdc7ad276b120bcb0c57c44d28e3894 /spec/views | |
parent | 2d4fd769a7a53f6f8ac1cd0331a8eb6b625dc8b6 (diff) | |
download | gitlab-ce-34eea29511b9730fdab0316573d26d864d0f1e98.tar.gz |
Fix test and only show job status title if it's
cancelled and the pipeline is auto-cancelled.
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/pipelines/show.html.haml_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/views/projects/pipelines/show.html.haml_spec.rb b/spec/views/projects/pipelines/show.html.haml_spec.rb index dca78dec6df..bb39ec8efbf 100644 --- a/spec/views/projects/pipelines/show.html.haml_spec.rb +++ b/spec/views/projects/pipelines/show.html.haml_spec.rb @@ -5,7 +5,13 @@ describe 'projects/pipelines/show' do let(:user) { create(:user) } let(:project) { create(:project, :repository) } - let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.id, user: user) } + + let(:pipeline) do + create(:ci_empty_pipeline, + project: project, + sha: project.commit.id, + user: user) + end before do controller.prepend_view_path('app/views/projects') @@ -21,7 +27,7 @@ describe 'projects/pipelines/show' do create(:generic_commit_status, pipeline: pipeline, stage: 'external', name: 'jenkins', stage_idx: 3) assign(:project, project) - assign(:pipeline, pipeline) + assign(:pipeline, pipeline.present(current_user: user)) assign(:commit, project.commit) allow(view).to receive(:can?).and_return(true) |