diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-13 18:39:12 +0300 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-22 23:26:29 +0300 |
commit | e2d5818ee1baa154474124ccc15ad3a29635f1ea (patch) | |
tree | 03eab77125d0d89667557b8ceb66f5d113aacb2f /spec/views | |
parent | 0068c4498a8a41156450b900232ddfb9766fb610 (diff) |
Show pipeline creator & created_at in heading
Instead of showing the commit author & authored_date that triggered
the pipeline, show the user and created_at in the heading of the
pipeline show.
Diffstat (limited to 'spec/views')
-rw-r--r-- | spec/views/projects/pipelines/show.html.haml_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/views/projects/pipelines/show.html.haml_spec.rb b/spec/views/projects/pipelines/show.html.haml_spec.rb index c101f6f164d..e4aeaeca508 100644 --- a/spec/views/projects/pipelines/show.html.haml_spec.rb +++ b/spec/views/projects/pipelines/show.html.haml_spec.rb @@ -3,8 +3,9 @@ require 'spec_helper' describe 'projects/pipelines/show' do include Devise::Test::ControllerHelpers + let(:user) { create(:user) } let(:project) { create(:project) } - let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.id) } + let(:pipeline) { create(:ci_empty_pipeline, project: project, sha: project.commit.id, user: user) } before do controller.prepend_view_path('app/views/projects') @@ -21,6 +22,7 @@ describe 'projects/pipelines/show' do assign(:project, project) assign(:pipeline, pipeline) + assign(:commit, project.commit) allow(view).to receive(:can?).and_return(true) end @@ -31,6 +33,12 @@ describe 'projects/pipelines/show' do expect(rendered).to have_css('.js-pipeline-graph') expect(rendered).to have_css('.js-grouped-pipeline-dropdown') + # header + expect(rendered).to have_text("##{pipeline.id}") + expect(rendered).to have_css('time', text: pipeline.created_at.strftime("%b %d, %Y")) + expect(rendered).to have_selector(%Q(img[alt$="#{pipeline.user.name}'s avatar"])) + expect(rendered).to have_link(pipeline.user.name, href: user_path(pipeline.user)) + # stages expect(rendered).to have_text('Build') expect(rendered).to have_text('Test') |