diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-10-31 21:29:29 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-10-31 21:29:29 +0000 |
commit | 68dadc98ae94f9c20bd5f80c8eeb78d46cc45d53 (patch) | |
tree | e5482793f15829f6433d3f87bcdcd83b05b697f3 /spec | |
parent | 4707e341826ce67a725d270f8ac03e2e28c4924c (diff) | |
parent | 73f697d53bdec63e65bb95c328d69afef7c86e45 (diff) | |
download | gitlab-ce-68dadc98ae94f9c20bd5f80c8eeb78d46cc45d53.tar.gz |
Merge branch '20892-commit-info' into 'master'
Resolve "Clean up commit meta info view"
Updates commit page design
Before:
![Screen_Shot_2016-10-19_at_10.20.10_AM](/uploads/8737a9db01bffc019d8b2c71a943024b/Screen_Shot_2016-10-19_at_10.20.10_AM.png)
After:
![Screen_Shot_2016-10-19_at_10.20.01_AM](/uploads/716cb902bd20dedc705a8f81f6536736/Screen_Shot_2016-10-19_at_10.20.01_AM.png)
![Screen_Shot_2016-10-19_at_10.27.01_AM](/uploads/4228575f50990a88bc828037d8fb99f2/Screen_Shot_2016-10-19_at_10.27.01_AM.png)
Closes #20892
See merge request !6994
Diffstat (limited to 'spec')
-rw-r--r-- | spec/views/projects/commit/_commit_box.html.haml_spec.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/spec/views/projects/commit/_commit_box.html.haml_spec.rb b/spec/views/projects/commit/_commit_box.html.haml_spec.rb new file mode 100644 index 00000000000..16bf0698c4b --- /dev/null +++ b/spec/views/projects/commit/_commit_box.html.haml_spec.rb @@ -0,0 +1,28 @@ +require 'spec_helper' + +describe 'projects/commit/_commit_box.html.haml' do + include Devise::Test::ControllerHelpers + + let(:project) { create(:project) } + + before do + assign(:project, project) + assign(:commit, project.commit) + end + + it 'shows the commit SHA' do + render + + expect(rendered).to have_text("Commit #{Commit.truncate_sha(project.commit.sha)}") + end + + it 'shows the last pipeline that ran for the commit' do + create(:ci_pipeline, project: project, sha: project.commit.id, status: 'success') + create(:ci_pipeline, project: project, sha: project.commit.id, status: 'canceled') + third_pipeline = create(:ci_pipeline, project: project, sha: project.commit.id, status: 'failed') + + render + + expect(rendered).to have_text("Pipeline ##{third_pipeline.id} for #{Commit.truncate_sha(project.commit.sha)} failed") + end +end |