diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2017-03-16 00:44:31 +0000 |
---|---|---|
committer | Jacob Schatz <jschatz@gitlab.com> | 2017-03-16 00:44:31 +0000 |
commit | ec970763e996b6a302cd7361c48d461d5622e7a0 (patch) | |
tree | 3a225fc02e093efbb5c6d48908c9dcf43acd52fe /spec/models/commit_spec.rb | |
parent | acb1b3eec1ac1859b08de4ecbed3f494e1ca50e8 (diff) | |
download | gitlab-ce-ec970763e996b6a302cd7361c48d461d5622e7a0.tar.gz |
Adds pipeline mini-graph to system information box in Commit View
Diffstat (limited to 'spec/models/commit_spec.rb')
-rw-r--r-- | spec/models/commit_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 32f9366a14c..4b449546a30 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -212,6 +212,25 @@ eos end end + describe '#latest_pipeline' do + let!(:first_pipeline) do + create(:ci_empty_pipeline, + project: project, + sha: commit.sha, + status: 'success') + end + let!(:second_pipeline) do + create(:ci_empty_pipeline, + project: project, + sha: commit.sha, + status: 'success') + end + + it 'returns latest pipeline' do + expect(commit.latest_pipeline).to eq second_pipeline + end + end + describe '#status' do context 'without ref argument' do before do |