diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 15:08:09 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-30 15:08:09 +0000 |
commit | 538fff823de57d1ba5317961aa43091de9dc007f (patch) | |
tree | c741665b338cc0d51ce5f73f5671e5eee8e69349 /spec/presenters | |
parent | 3692e9f8a23386c627942ca2a9edd8c00af7e904 (diff) | |
download | gitlab-ce-538fff823de57d1ba5317961aa43091de9dc007f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/commit_presenter_spec.rb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/spec/presenters/commit_presenter_spec.rb b/spec/presenters/commit_presenter_spec.rb index 4a0d3a28c32..58179e9a337 100644 --- a/spec/presenters/commit_presenter_spec.rb +++ b/spec/presenters/commit_presenter_spec.rb @@ -17,15 +17,19 @@ describe CommitPresenter do end it 'returns commit status for ref' do - expect(commit).to receive(:status).with('ref').and_return('test') + pipeline = double + status = double - expect(subject).to eq('test') + expect(commit).to receive(:latest_pipeline).with('ref').and_return(pipeline) + expect(pipeline).to receive(:detailed_status).with(user).and_return(status) + + expect(subject).to eq(status) end end context 'when user can not read_commit_status' do - it 'is false' do - is_expected.to eq(false) + it 'is nil' do + is_expected.to eq(nil) end end end |