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/features/commits_spec.rb | |
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/features/commits_spec.rb')
-rw-r--r-- | spec/features/commits_spec.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/features/commits_spec.rb b/spec/features/commits_spec.rb index 0e305c52358..86a00401088 100644 --- a/spec/features/commits_spec.rb +++ b/spec/features/commits_spec.rb @@ -11,12 +11,15 @@ describe 'Commits' do stub_ci_pipeline_to_return_yaml_file end + let(:creator) { create(:user) } let!(:pipeline) do create(:ci_pipeline, project: project, + user: creator, ref: project.default_branch, sha: project.commit.sha, - status: :success) + status: :success, + created_at: 5.months.ago) end context 'commit status is Generic Commit Status' do @@ -80,7 +83,8 @@ describe 'Commits' do it 'shows pipeline`s data' do expect(page).to have_content pipeline.sha[0..7] expect(page).to have_content pipeline.git_commit_message - expect(page).to have_content pipeline.git_author_name + expect(page).to have_content pipeline.user.name + expect(page).to have_content pipeline.created_at.strftime('%b %d, %Y') end end @@ -150,7 +154,7 @@ describe 'Commits' do it do expect(page).to have_content pipeline.sha[0..7] expect(page).to have_content pipeline.git_commit_message - expect(page).to have_content pipeline.git_author_name + expect(page).to have_content pipeline.user.name expect(page).to have_link('Download artifacts') expect(page).not_to have_link('Cancel running') expect(page).not_to have_link('Retry') @@ -169,7 +173,7 @@ describe 'Commits' do it do expect(page).to have_content pipeline.sha[0..7] expect(page).to have_content pipeline.git_commit_message - expect(page).to have_content pipeline.git_author_name + expect(page).to have_content pipeline.user.name expect(page).not_to have_link('Download artifacts') expect(page).not_to have_link('Cancel running') expect(page).not_to have_link('Retry') |